1. S C
  2. PowerBuilder
  3. Monday, 12 February 2018

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
0
Votes
Undo

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
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. S C
  2. Tuesday, 13 February 2018
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. Lars Mosegaard
  2. Tuesday, 13 February 2018
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. S C
  2. Tuesday, 13 February 2018
There are no comments made yet.
  1. Tuesday, 13 February 2018
  2. PowerBuilder
  3. # 1
Lars Mosegaard Accepted Answer Pending Moderation
0
Votes
Undo

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.
  1. Monday, 12 February 2018
  2. PowerBuilder
  3. # 2
  • Page :
  • 1


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