1. Luca Militello
  2. PowerBuilder
  3. Tuesday, 14 March 2023 14:18 PM UTC


I have a problem with a datawindow field when its length exceeds the height of the page. The field can be up to 4000 characters long. When exposed in the datawindow, it happens that the text is truncated and carried over to the next page. The field is defined with the "autosize height" property active, as is the detail band.
the datawindow containing this field is a nested DW . I have tried in every way to widen the space between the various fields and to resize the DW also in the parent DW, but the problem persists.
I am attaching a sample PDF print.

The problem occurs both in Pb12_5 and in Pb2019
As can be seen from page 2 to page 3 and from page. 3 on page 4 the content of the field is splitted and resumed on the next page.

Does anyone have any suggestions?
Thank you


Attachments (1)
Olan Knight Accepted Answer Pending Moderation
  1. Tuesday, 14 March 2023 21:06 PM UTC
  2. PowerBuilder
  3. # 1

I think I found a workaround a while back for this issue.... ( I hope I'm remembering this correctly!)

Have you tried to set the AutoSize height in the parent DW, in both the field (the nested dw) and in the band of the parent  DW in which the  nested DW resides?

  1. Luca Militello
  2. Wednesday, 15 March 2023 11:40 AM UTC
Hi Olan, thank you.

I had already tried to do as you suggest but unfortunately nothing changes.

  1. Helpful
There are no comments made yet.
Luca Militello Accepted Answer Pending Moderation
  1. Tuesday, 14 March 2023 16:05 PM UTC
  2. PowerBuilder
  3. # 2

Hi Renè, thank you for your reply.

I made a first test, dividing the field into several compute fields and thus breaking the string into smaller parts. The structure of the DW is attached. But the result doesn't change. In the attachment "example 2.pdf" between page 3 and page 4 the behavior is always the same.

Did you mean this solution?

Thank you



Attachments (2)
  1. René Ullrich
  2. Wednesday, 15 March 2023 08:11 AM UTC
No, this will not work. The problem ist that your (autosized) detail band ist to large for one page. So it would not help to split the large field in different fields because you still have one large detail band.

You have to split the data and put it in new rows. In this case PB can do a page break between the rows.


Your row is two columns:

1; "a very very large text"

Split it to:

1; "a very very"

(null);"large text"

It solves the problem that PB forces a pake break in the details band. But it may have side effects because you have line feeds for every split you make. Depending on how large your splitted text parts are it may be that you have large unused empty space before a page break.

I solved it using a font with fixed character size. So I know how many characters I can put in one line. I splitted my text to have only one text line in a row. In this case I have no short line effects (e.g. only one word on new line because of my splt) and no empty space before a page break.

  1. Helpful 1
  1. Luca Militello
  2. Wednesday, 15 March 2023 11:50 AM UTC
Hi René,

ok sorry now I understand what you meant.

I did some tests and it seems to work! Now I need to tweak the truncating of words within a line a bit, but in general it seems ok!

Thanks a lot!

  1. Helpful
There are no comments made yet.
René Ullrich Accepted Answer Pending Moderation
  1. Tuesday, 14 March 2023 14:31 PM UTC
  2. PowerBuilder
  3. # 3

Hi Luca,

This is a very old problem with datawindows and it is not solved yet.

As workaround you could split the text in your long column (using Powerscript) to have smaller text parts in multiple datawindow rows. In this case Powerbuilder can do a pagebreak inside the text what would look better.



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.