1. Glenn Barber
  2. PowerBuilder
  3. Monday, 12 February 2018 20:19 PM UTC

Is there a straightforward way to position a group summary so it appears on the bottom of the page like a footer? 

Alternately we could have the visibility of the footer set by some variable - but no straightforward way I can think of to coordinate with a group break.

Ive seen this requested a few times in the past but no answer.

 

 

Govinda Lopez @Appeon Accepted Answer Pending Moderation
  1. Monday, 12 February 2018 21:31 PM UTC
  2. PowerBuilder
  3. # 1

Hi Glenn,

 

I agree with Lars. His approach seems simple and effective.

 

 

Regards,

Comment
  1. Glenn Barber
  2. Tuesday, 13 February 2018 05:03 AM UTC
We'll we got it to work somewhat.  What we did was create a computed column in the detail using  getrow(), then tested that as "category" in the above expression.



The problem with the footer objects, was even if they were invisible and autosized, and the footer was collapsed and autosize height, it was still allocating the footer space rather than letting the detail print to the bottom of the page.



So alternately, what we need is to somehow fix the group total band to the bottom of the page like a footer.  Can we do that with a Background or some other positioning mechanism?



 

  1. Helpful
  1. Olan Knight
  2. Tuesday, 13 February 2018 18:39 PM UTC
What I have done in the past is to create ANOTHER computed field "total_visible", value 0 or whatever the height of the group summary object is when visible>.

This value is set by default to 0, and is used at the expression for the HEIGHT of the group_total field.

After the values are set, issue a GroupCalc() command on the dw.



Olan

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

Answer from similar post:

 

-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
  1. Glenn Barber
  2. Monday, 12 February 2018 23:15 PM UTC
If you mean "category" to be the column of the datawindow that we are breaking the group on - then every footer of the group has the same value for the column which is the same as the last value for the group (we tried)  - What we are looking for is to have the footer only appear on the last page of the group.



Is there some other meaning for category here? Row perhaps?



 

  1. Helpful
  1. Lars Mosegaard
  2. Tuesday, 13 February 2018 00:20 AM UTC
Yes I seeee! You are right. It won't work as is.



Yes category is the grouped by column.



Maybe this would work for the visible attribute.



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



or this might work



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



(category[1] refers to the category of the next row )

  1. Helpful
  1. Glenn Barber
  2. Tuesday, 13 February 2018 05:04 AM UTC
Please see my response to Govinda below..

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