1. Vladimir K.
  2. PowerBuilder
  3. Monday, 7 March 2022 15:07 PM UTC

Hi All.

APPEON PB2019R2

Have a tabular datawindow with two group by's.

First one: ... newpage=yes resetpagecount=yes ...

In the footer, i need to display "current page" - pageabs() works just fine and "total number of pages" - obviously pagecount() will NOT work for me.

I need something like "pagecountabs()" if you will.

I did try computed field with all kind of different expressions with available function (max, last, count etc...) , but no luck so far. 

Is it even possible?

If it is, help will be greatly appreciated.

Thank you

Sincerely

Vlad

Accepted Answer
John Fauss Accepted Answer Pending Moderation
  1. Monday, 7 March 2022 20:52 PM UTC
  2. PowerBuilder
  3. # Permalink

Vladimir -

In further experimentation, I also experienced the same issue as you in another report window/datawindow, but I think I found the solution:

Perform a dw.GroupCalc() immediately after the dw.Retrieve(). The new computed field with the expression I suggested earlier should then display the correct page count.

Comment
  1. Vladimir K.
  2. Tuesday, 8 March 2022 14:53 PM UTC
Hi John.

It worked.



Greatly appreciated your help.

Thank you.

Sincerely Vladimir

  1. Helpful
  1. John Fauss
  2. Tuesday, 8 March 2022 15:07 PM UTC
You're welcome! That's great news!
  1. Helpful
There are no comments made yet.
John Fauss Accepted Answer Pending Moderation
  1. Monday, 7 March 2022 16:25 PM UTC
  2. PowerBuilder
  3. # 1

Hi, Vladimir - 

Try this: Create a computed field and use this for the expression:

   Max(PageAbs() for all)

Regards, John

Comment
  1. Vladimir K.
  2. Monday, 7 March 2022 16:53 PM UTC
Hi John.

Thank you for reply.

I did, returns 1
  1. Helpful
  1. John Fauss
  2. Monday, 7 March 2022 17:15 PM UTC
I tried it in a tabular report DW containing two groups and set newpage=yes and resetpagecount=yes in group 1 as a test before my original reply, and it worked fine. My test produced 299 pages. This was using PB2019 R3, however. You may have something else in the DW that is affecting the behavior.



Are you placing this new computed field in the footer band?



Are you viewing the DW in Print Preview mode?



Can you export the source for your DW, zip it, and attach in a new post?
  1. Helpful
There are no comments made yet.
  • Page :
  • 1


There are no replies made for this question yet.
However, you are not allowed to reply to this question.