1. S C
  2. PowerBuilder
  3. Monday, 12 February 2018 20:20 PM UTC

I would like for my dw footer to only appear on the last page of each group.  The reason I'm not using the group's trailer is because the trailer doesn't position at the bottom of the page, which is want I need. Although the trailer accomplishes my need of only appearing when the group changes it also positions just after the last row of the detail instead of a the bottom of the page.  Any thoughts?

Lars Mosegaard Accepted Answer Pending Moderation
  1. Tuesday, 13 February 2018 00:24 AM UTC
  2. PowerBuilder
  3. # 1

as with the other post, my previous suggestion wont work...

Try this where category is the grouped by column and category[1] refers to the category of the next row:

Either

if ( getrow() = rowcount() or category[1] <> last ( category for group 1) , 1 , 0 )

or 

if ( category[1] <> category  , 1 , 0 )

The later may not work for the last group...  

Comment
  1. S C
  2. Tuesday, 13 February 2018 02:08 AM UTC
Thanks for your response.  Yes, confirmed your first suggestions doesn't work, but did find something that does. So now I have the footer objects only on the last page for each Group.  But there's a problem; the footer allocates the vertical space to those objects in the footer even if they aren't visible.  So I decided to make the height/wdith sizes conditional, which works except again the footer allocates the space.  So I have the problem of a big empty area on each page that doesn't have the footer objects visible. 

  1. Helpful
  1. Lars Mosegaard
  2. Tuesday, 13 February 2018 03:09 AM UTC
If the footer is autoheight = true and height=0, it should work.



In the past I think I had to either do a groupcalc() after retrieve or maybe force the datawindow to re-calculate each footer:



Modify("DataWindow.Footer.Height.AutoSize=No")



then 



Modify("DataWindow.Footer.Height.AutoSize=Yes")

  1. Helpful
  1. S C
  2. Tuesday, 13 February 2018 03:48 AM UTC
Footer autosize height = True and default size = 0. And am already performing a GroupCalc() at the end after all my retrieves have occurred.  



Tried your suggestion of setting AutoSze = No, then Yes.  No change. 

  1. Helpful
There are no comments made yet.
Lars Mosegaard Accepted Answer Pending Moderation
  1. Monday, 12 February 2018 21:19 PM UTC
  2. PowerBuilder
  3. # 2

This probably could work:

For every object in your footer band make the visible attribute conditional:   if ( category = last ( category for group 1 ), 1 , 0 )

Make the footer collapsed and autosize height.  May need to make the objects in the footer band autosize as well.

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.