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.

Function 'page()' does not work with 'label'-type dw

5 posts in DataWindow Last posting was on 2009-03-06 15:59:10.0Z
Marc Schmidtmayer Posted on 2009-02-23 08:36:45.0Z
Sender: 7255.49a25ddc.1804289383@sybase.com
From: Marc Schmidtmayer
Newsgroups: sybase.public.powerbuilder.datawindow
Subject: Function 'page()' does not work with 'label'-type dw
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <49a2601d.7281.1681692777@sybase.com>
NNTP-Posting-Host: 10.22.241.41
X-Original-NNTP-Posting-Host: 10.22.241.41
Date: 23 Feb 2009 00:36:45 -0800
X-Trace: forums-1-dub 1235378205 10.22.241.41 (23 Feb 2009 00:36:45 -0800)
X-Original-Trace: 23 Feb 2009 00:36:45 -0800, 10.22.241.41
Lines: 24
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.datawindow:88846
Article PK: 418099

Hi,
In our application, we give the users the possibility to
visualize 'old(er)' PSR's.
So we load the PSR in a window and have (also) 'pagenext' /
'pageprev' buttons.
In the title of the window we show (also) the number of the
'current' page and the total pages : example : page 5/13.

This is done via the functions : page() and pagecount().

Well, all ok except for dw's of the 'label'-type : here, the
'page()'-function gives always '1' !

Here the code :
li_TotPages =
LONG(dw_1.DESCRIBE("evaluate('pagecount()',1)"))
li_CurrentPage = LONG(dw_1.DESCRIBE("evaluate('page()',1)"))

We work in Powerbuilder 10.5.
Apparently, it worked in Powerbuilder 8.

Anyone an idea why it does not work ?

Thanks, Marc.


Marc Schmidtmayer Posted on 2009-02-26 15:56:09.0Z
Sender: 7525.49a27d63.1804289383@sybase.com
From: Marc Schmidtmayer
Newsgroups: sybase.public.powerbuilder.datawindow
Subject: Re: Function 'page()' does not work with 'label'-type dw
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <49a6bb99.64af.1681692777@sybase.com>
References: <49a2601d.7281.1681692777@sybase.com>
NNTP-Posting-Host: 10.22.241.41
X-Original-NNTP-Posting-Host: 10.22.241.41
Date: 26 Feb 2009 07:56:09 -0800
X-Trace: forums-1-dub 1235663769 10.22.241.41 (26 Feb 2009 07:56:09 -0800)
X-Original-Trace: 26 Feb 2009 07:56:09 -0800, 10.22.241.41
Lines: 28
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.datawindow:88877
Article PK: 418130

Not anyone ? :-(

> Hi,
> In our application, we give the users the possibility to
> visualize 'old(er)' PSR's.
> So we load the PSR in a window and have (also) 'pagenext'
> / 'pageprev' buttons.
> In the title of the window we show (also) the number of
> the 'current' page and the total pages : example : page
> 5/13.
>
> This is done via the functions : page() and pagecount().
>
> Well, all ok except for dw's of the 'label'-type : here,
> the 'page()'-function gives always '1' !
>
> Here the code :
> li_TotPages =
> LONG(dw_1.DESCRIBE("evaluate('pagecount()',1)"))
> li_CurrentPage =
> LONG(dw_1.DESCRIBE("evaluate('page()',1)"))
>
> We work in Powerbuilder 10.5.
> Apparently, it worked in Powerbuilder 8.
>
> Anyone an idea why it does not work ?
>
> Thanks, Marc.


Dave Hauze Posted on 2009-02-26 19:56:43.0Z
From: "Dave Hauze" <david.hauze@steeldynamics.com>
Newsgroups: sybase.public.powerbuilder.datawindow
References: <49a2601d.7281.1681692777@sybase.com> <49a6bb99.64af.1681692777@sybase.com>
Subject: Re: Function 'page()' does not work with 'label'-type dw
Lines: 47
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.3198
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <49a6f3fb$1@forums-1-dub>
Date: 26 Feb 2009 11:56:43 -0800
X-Trace: forums-1-dub 1235678203 10.22.241.152 (26 Feb 2009 11:56:43 -0800)
X-Original-Trace: 26 Feb 2009 11:56:43 -0800, vip152.sybase.com
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.datawindow:88880
Article PK: 418131

Marc, I've thought of a couple of way's to do this in datawindow's in which
you can change, but not in PSR's. Here's the issue (I believe), it has to do
with row selection. When you retrieve the datawindow, you are on Row 1 by
default. Paging through the .PSR does not change your row focus, therefore
when you run the page() function is returning Page 1. Now, a couple of
things you could do in a new data window is to add a calculated field with
Page() in it. Then, as you scroll through pages, change the row selection to
the first row on the page (or any row on that page really), and then read
the calculated field for your display. This has worked for me, even with
Labels. But I'm not sure if that really solves your problem (which is why I
held off on pointing it out).

--
Dave Hauze

<Marc Schmidtmayer> wrote in message
news:49a6bb99.64af.1681692777@sybase.com...
> Not anyone ? :-(
>
>> Hi,
>> In our application, we give the users the possibility to
>> visualize 'old(er)' PSR's.
>> So we load the PSR in a window and have (also) 'pagenext'
>> / 'pageprev' buttons.
>> In the title of the window we show (also) the number of
>> the 'current' page and the total pages : example : page
>> 5/13.
>>
>> This is done via the functions : page() and pagecount().
>>
>> Well, all ok except for dw's of the 'label'-type : here,
>> the 'page()'-function gives always '1' !
>>
>> Here the code :
>> li_TotPages =
>> LONG(dw_1.DESCRIBE("evaluate('pagecount()',1)"))
>> li_CurrentPage =
>> LONG(dw_1.DESCRIBE("evaluate('page()',1)"))
>>
>> We work in Powerbuilder 10.5.
>> Apparently, it worked in Powerbuilder 8.
>>
>> Anyone an idea why it does not work ?
>>
>> Thanks, Marc.


Marc Schmidtmayer Posted on 2009-03-03 10:13:30.0Z
Sender: 14df.49ad0017.1804289383@sybase.com
From: Marc Schmidtmayer
Newsgroups: sybase.public.powerbuilder.datawindow
Subject: Re: Function 'page()' does not work with 'label'-type dw
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <49ad02ca.1518.1681692777@sybase.com>
References: <49a6f3fb$1@forums-1-dub>
NNTP-Posting-Host: 10.22.241.41
X-Original-NNTP-Posting-Host: 10.22.241.41
Date: 3 Mar 2009 02:13:30 -0800
X-Trace: forums-1-dub 1236075210 10.22.241.41 (3 Mar 2009 02:13:30 -0800)
X-Original-Trace: 3 Mar 2009 02:13:30 -0800, 10.22.241.41
Lines: 35
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.datawindow:88897
Article PK: 418149

Hi Dave, thanks for your answer/reaction.
I can see what you mean but then there's a thing which
remains not clear.
For the other PSR's (created from freeform, grid, ...
datawindows) the Page() function does return the correct
page number ... even in the PSR.
It is only for PSR's created from label datawindows that the
Page() function does not work.
Thanks for the solution you mentioned on 'new' datawondows.

If you (or someone else) have other ideas/solutionss ...
please do not hesitate and reply to this topic ...
It will be appreciated !

Thanks.

> Marc, I've thought of a couple of way's to do this in
> datawindow's in which you can change, but not in PSR's.
> Here's the issue (I believe), it has to do with row
> selection. When you retrieve the datawindow, you are on
> Row 1 by default. Paging through the .PSR does not change
> your row focus, therefore when you run the page()
> function is returning Page 1. Now, a couple of things you
> could do in a new data window is to add a calculated field
> with Page() in it. Then, as you scroll through pages,
> change the row selection to the first row on the page (or
> any row on that page really), and then read the
> calculated field for your display. This has worked for me,
> even with Labels. But I'm not sure if that really solves
> your problem (which is why I held off on pointing it
> out).
>
> --
> Dave Hauze
>


Dave Hauze Posted on 2009-03-06 15:59:10.0Z
From: "Dave Hauze" <david.hauze@steeldynamics.com>
Newsgroups: sybase.public.powerbuilder.datawindow
References: <49a6f3fb$1@forums-1-dub> <49ad02ca.1518.1681692777@sybase.com>
Subject: Re: Function 'page()' does not work with 'label'-type dw
Lines: 46
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.3198
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <49b1484e@forums-1-dub>
Date: 6 Mar 2009 07:59:10 -0800
X-Trace: forums-1-dub 1236355150 10.22.241.152 (6 Mar 2009 07:59:10 -0800)
X-Original-Trace: 6 Mar 2009 07:59:10 -0800, vip152.sybase.com
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.datawindow:88919
Article PK: 418171

Yeah, that is interesting, I sorry I couldn't be of any help, I'm not sure
why it is behaving as it is... Good luck finding an answer, and if you come
up with one on your own, please share it with the rest of us...

--
Dave Hauze

<Marc Schmidtmayer> wrote in message
news:49ad02ca.1518.1681692777@sybase.com...
> Hi Dave, thanks for your answer/reaction.
> I can see what you mean but then there's a thing which
> remains not clear.
> For the other PSR's (created from freeform, grid, ...
> datawindows) the Page() function does return the correct
> page number ... even in the PSR.
> It is only for PSR's created from label datawindows that the
> Page() function does not work.
> Thanks for the solution you mentioned on 'new' datawondows.
>
> If you (or someone else) have other ideas/solutionss ...
> please do not hesitate and reply to this topic ...
> It will be appreciated !
>
> Thanks.
>
>> Marc, I've thought of a couple of way's to do this in
>> datawindow's in which you can change, but not in PSR's.
>> Here's the issue (I believe), it has to do with row
>> selection. When you retrieve the datawindow, you are on
>> Row 1 by default. Paging through the .PSR does not change
>> your row focus, therefore when you run the page()
>> function is returning Page 1. Now, a couple of things you
>> could do in a new data window is to add a calculated field
>> with Page() in it. Then, as you scroll through pages,
>> change the row selection to the first row on the page (or
>> any row on that page really), and then read the
>> calculated field for your display. This has worked for me,
>> even with Labels. But I'm not sure if that really solves
>> your problem (which is why I held off on pointing it
>> out).
>>
>> --
>> Dave Hauze
>>