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?
- You are here:
- Home
- Q&A
- Q&A
- PowerBuilder
- Footer only on last page of DW Group
- S C
- PowerBuilder
- Monday, 12 February 2018 20:20 PM UTC
- Monday, 12 February 2018 21:19 PM UTC
- PowerBuilder
- # 1
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.
- Tuesday, 13 February 2018 00:24 AM UTC
- PowerBuilder
- # 2
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
- S C
- 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.
-
Helpful Loading... Helpful 0
- Lars Mosegaard
- 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")
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")
-
Helpful Loading... Helpful 0
- S C
- 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.
Tried your suggestion of setting AutoSze = No, then Yes. No change.
-
Helpful Loading... Helpful 0
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.
However, you are not allowed to reply to this question.
Please login to post a reply
You will need to be logged in to be able to post a reply. Login using the form on the right or register an account if you are new here. Register Here »