Footer only on last page of DW Group

1
0
-1

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?

Question Tags: 

Answers

Lars Mosegaard answered Footer only on last page of DW Group

1
-1
-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...  

spcoit_30087's picture

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. 

Lars Mosegaard's picture

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")

spcoit_30087's picture

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.