1. Tom McArdle
  2. PowerBuilder
  3. Wednesday, 16 January 2019 21:27 PM UTC
Hi, I would like to know if there's any way to make a page break on a group
only when this group does not fit completely on a single page. For example,
we have a dw with a group on the ORDER column. We have several lines that do not fit entirely on the first
page, so I'd like to have the order group on page 2. I am sure there is an
option for this but I can't find it.
 
I do not want to use the group Page Break option because I do not want one order per page.
 
Can anybody help me?
Thank you!

Tom 

Miguel Leeuwe Accepted Answer Pending Moderation
  1. Wednesday, 6 February 2019 23:39 PM UTC
  2. PowerBuilder
  3. # 1

Hi Tom,

I seem to remember having a similar problem:

Have you tried putting the datawindow in "preview mode"? (dw_1.Modify("DataWindow.Print.Preview=Yes")

I think that might arrange your page numbering. Combined with:

(I suppose you already tried with) GroupCalc(), Sort(), and Setredraw(true). These commands will all recalculate the computed fields which are on the dw.

Not sure about the problem with saving as PDF (native?), it still seems buggy to me, but haven't tried that yet.

Sorry if it doesn't work out.

If I have some time I'll try to find my old code or make a small sample application.

(I guess you wouldn't have a sample app already?)

Regards,

Miguel

Comment
There are no comments made yet.
Tom McArdle Accepted Answer Pending Moderation
  1. Wednesday, 6 February 2019 21:02 PM UTC
  2. PowerBuilder
  3. # 2

Thank You Miguel.

 

I did try this approach, but it really did not work well. Especially when the report is quiet large. There was also an issue when you resized the page. When you then tried to save as a PDF it seemed to have a different counter.

 

Is was a good idea.

 

Tank you

Tom

Comment
There are no comments made yet.
Tom McArdle Accepted Answer Pending Moderation
  1. Thursday, 17 January 2019 16:06 PM UTC
  2. PowerBuilder
  3. # 3

Thank you very much. I will check this out.

 

Tom

Comment
  1. Miguel Leeuwe
  2. Thursday, 17 January 2019 16:36 PM UTC
You're welcome, I remember having done something like that somewhere in the 90's.

When I'm at home, (in 2 hours time). I'll have a look in my old code to see if I can find anything of use.
  1. Helpful
There are no comments made yet.
Miguel Leeuwe Accepted Answer Pending Moderation
  1. Thursday, 17 January 2019 15:44 PM UTC
  2. PowerBuilder
  3. # 4

It would be a very nice feature to have after all these years, to be able to avoid "orphaned groups" by marking a checkbox :)

 

Can we make this a feature request?

 

Comment
  1. Chris Pollach @Appeon
  2. Thursday, 17 January 2019 16:30 PM UTC
Hi Miguel;

Please open a Support Ticket and define this as an enhancement request. That should then be routed on to Engineering's ToDo list for a feasibility review.

Regards ... Chris
  1. Helpful
  1. Miguel Leeuwe
  2. Thursday, 17 January 2019 16:37 PM UTC
Will do, cheers!
  1. Helpful
There are no comments made yet.
Miguel Leeuwe Accepted Answer Pending Moderation
  1. Thursday, 17 January 2019 15:14 PM UTC
  2. PowerBuilder
  3. # 5

From https://groups.google.com/forum/#!topic/sybase.public.powerbuilder.general/OR0xP57CezA

Ugliness alert! Hack! Hack!
Add an unshown computed column to the SQL
Add a group on the computed column with new page on group break
Describe "DataWindow.LastRowOnPage"
Use FindGroupChange to determine if the last row in each group is on the 
current page
If there is a spillover, set the computed column on the first row of the 
group.
GroupCalc()

 

 
 
Comment
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.
We use cookies which are necessary for the proper functioning of our websites. We also use cookies to analyze our traffic, improve your experience and provide social media features. If you continue to use this site, you consent to our use of cookies.