Sybase NNTP forums - End Of Life (EOL)

The NNTP forums from Sybase - forums.sybase.com - are now closed.

All new questions should be directed to the appropriate forum at the SAP Community Network (SCN).

Individual products have links to the respective forums on SCN, or you can go to SCN and search for your product in the search box (upper right corner) to find your specific developer center.

Problem with displayed text in a computed field

2 posts in DataWindow Last posting was on 2009-01-20 23:11:33.0Z
Gaurav Posted on 2009-01-19 07:34:54.0Z
From: Gaurav <gaurav.mendse@gmail.com>
Newsgroups: sybase.public.powerbuilder.datawindow
Subject: Problem with displayed text in a computed field
Date: Sun, 18 Jan 2009 23:34:54 -0800 (PST)
Organization: http://groups.google.com
Lines: 37
Message-ID: <2cb128cb-6e7d-46f7-9cbd-7b859d73f438@p2g2000prn.googlegroups.com>
NNTP-Posting-Host: 220.227.113.177
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
X-Trace: posting.google.com 1232350494 18585 127.0.0.1 (19 Jan 2009 07:34:54 GMT)
X-Complaints-To: groups-abuse@google.com
NNTP-Posting-Date: Mon, 19 Jan 2009 07:34:54 +0000 (UTC)
Complaints-To: groups-abuse@google.com
Injection-Info: p2g2000prn.googlegroups.com; posting-host=220.227.113.177; posting-account=ADxSrQoAAADfaxHgREn9yGXOKDgtVtgR
User-Agent: G2/1.0
X-HTTP-UserAgent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 1.1.4322; .NET CLR 2.0.50727),gzip(gfe),gzip(gfe)
Path: forums-1-dub!forums-master!newssvr.sybase.com!news-sj-1.sprintlink.net!news-peer1.sprintlink.net!newsfeed.yul.equant.net!nntp1.roc.gblx.net!nntp.gblx.net!nntp.gblx.net!nlpi057.nbdc.sbc.com!prodigy.net!news.glorb.com!news2.glorb.com!postnews.google.com!p2g2000prn.googlegroups.com!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.datawindow:88639
Article PK: 417889

Hi,

I have a computed field in my datawindow report which displays the
text passed to a string argument. For example, "as_notes" is the
argument which is the computed field expression and whatever text
passed to "as_notes" is displayed thro' the computed field.

The problem starts when the computed field text expands and the
computed field, with autosize height checked, spans beyond a DW page.
The last line shown for the computed field, on say page 1, and the
first text line displayed on say 2nd page for that computed field,
gets cut-off in half.

I have tried a raw method with the following expression -
if(len(as_notes) > 2800, left(as_notes, posA( as_notes , space(1),
2800 )) + '~r~n~r~n~r~n~r~n' +
right(as_notes, len(as_notes) - posA( as_notes , space(1), 2800 )),
as_notes)

In the above expression, I have assumed (hard-coded) the text length
as 2800 shown on the first DW/report page for the computed field and
have inserted "new lines" after the last complete word. The text
length assumption works with some sets of text, which I have tested,
but not all. Also, this will fail if the computed field spans over
more than 2 DW pages during run-time.

Please can anyone help me -
1. to know any hidden property of computed field which should take
care of the cut-off text,
2. any property to anyhow know the total number of characters
displayed for a part-of one computed field shown on each page of DW.

I have tested and tried the autosize, slideup, etc properties for this
field and also autosize for detail band, but no sucess.

Thanks,
Gaurav


Mike Marston Posted on 2009-01-20 23:11:33.0Z
From: "Mike Marston" <mikem@ksitech.com>
Newsgroups: sybase.public.powerbuilder.datawindow
References: <2cb128cb-6e7d-46f7-9cbd-7b859d73f438@p2g2000prn.googlegroups.com>
Subject: Re: Problem with displayed text in a computed field
Lines: 45
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.3138
X-RFC2646: Format=Flowed; Original
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3350
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <49765a25@forums-1-dub>
Date: 20 Jan 2009 15:11:33 -0800
X-Trace: forums-1-dub 1232493093 10.22.241.152 (20 Jan 2009 15:11:33 -0800)
X-Original-Trace: 20 Jan 2009 15:11:33 -0800, vip152.sybase.com
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.datawindow:88646
Article PK: 417901

Have you tried to change the font to "Verdana"? That has solved some "cut
off text" problems for us in the past.

"Gaurav" <gaurav.mendse@gmail.com> wrote in message
news:2cb128cb-6e7d-46f7-9cbd-7b859d73f438@p2g2000prn.googlegroups.com...
> Hi,
>
> I have a computed field in my datawindow report which displays the
> text passed to a string argument. For example, "as_notes" is the
> argument which is the computed field expression and whatever text
> passed to "as_notes" is displayed thro' the computed field.
>
> The problem starts when the computed field text expands and the
> computed field, with autosize height checked, spans beyond a DW page.
> The last line shown for the computed field, on say page 1, and the
> first text line displayed on say 2nd page for that computed field,
> gets cut-off in half.
>
> I have tried a raw method with the following expression -
> if(len(as_notes) > 2800, left(as_notes, posA( as_notes , space(1),
> 2800 )) + '~r~n~r~n~r~n~r~n' +
> right(as_notes, len(as_notes) - posA( as_notes , space(1), 2800 )),
> as_notes)
>
> In the above expression, I have assumed (hard-coded) the text length
> as 2800 shown on the first DW/report page for the computed field and
> have inserted "new lines" after the last complete word. The text
> length assumption works with some sets of text, which I have tested,
> but not all. Also, this will fail if the computed field spans over
> more than 2 DW pages during run-time.
>
> Please can anyone help me -
> 1. to know any hidden property of computed field which should take
> care of the cut-off text,
> 2. any property to anyhow know the total number of characters
> displayed for a part-of one computed field shown on each page of DW.
>
> I have tested and tried the autosize, slideup, etc properties for this
> field and also autosize for detail band, but no sucess.
>
> Thanks,
> Gaurav