1. Markus Eckert
  2. PowerBuilder
  3. Wednesday, 9 December 2020 10:32 AM UTC

Hi everyone,

I'm having trouble getting the Page() function to behave in a Richtext Datawindow in PB2019 R2 (and earlier until at least PB2017 R3).

In some cases, the page() function just plain doesn't work (i.e. always returns the same value no matter the page), sometimes it only works when it's converted to a string.

I've attached an example DW demonstrating the issue with four computed fields in the header:
1. The "builitin" Page X of Y computed field.
2. A computed field with the expression "page()"
3. A computed field with the expression "string(page())"
4. A computed field with the expression "if( page() = 1 , 'First Page', 'Other Page' )"

As you can see, the computed fields either all think they're on page 4, or (at times) only #1 and #3 work correctly

Does anyone have an idea on how to fix this?

Or does anyone know of a better idea to get text to only show up on page 1 of a Richtext Datawindow? (I've already tried converting the output of page() to a string in the if clause, the trick doesn't work there.)

Regards,
Markus

Attachments (1)
Armeen Mazda @Appeon Accepted Answer Pending Moderation
  1. Wednesday, 9 December 2020 14:52 PM UTC
  2. PowerBuilder
  3. # 1

Which RichText engine are you using?  TE Edit or TX TextControl?

Comment
  1. Markus Eckert
  2. Wednesday, 9 December 2020 14:59 PM UTC
Built-in TX Text Control
  1. Helpful
  1. Armeen Mazda @Appeon
  2. Wednesday, 9 December 2020 15:16 PM UTC
Please open a support ticket and provide your reproducible case. You can leave this Q&A up in case others have advice of better way to do this. But we would like support ticket so we can analyze if this is a bug. Thanks.
  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.