Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

This topic is 7788 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

Hi, all!

We all have reports we need to write, and sometimes those reports have grand totals. So we all make a Trailing Grand Summary and put the Grand_Total summary field in there, smile, and be happy. The problem is, what happens when records fill a page such that it bumbs our Trailing Grand Summary section off on to the next page? Well, the result is a poorly-looking report that is formatted something like...

REPORT

Fish..... $1.00

Lobster.. $3.00

Veal..... $4.00

<new page>

GRAND TOTAL... $8.00

Now, I for one would rather that one record be removed from the first page and placed with the Grand Total on the second page so as not to "Orphan" it. Does anybody know a solution for this?

Posted

Yes. You need three different layouts. The first one is the report layout you are already using. The second one is the same as the first except that it would have not grand summary part on it. The third one would be the same as the first except that it would have a first page header that is a little bigger so that some records get pushed onto the next page.

Then what you do is make a script that does this:

1. Switch to layout 1, find, sort etc. and then go to preview mode.

2. Go to Record/request/page [last]

3. Set a global variable gPageCount to Status(CurrentPageNumber)

This is how many pages your report is.

4. Switch to layout 2 and repeat the above steps. If you end up with the same number of pages, then you are okay. You can go ahead and print on layout 1. If you get a different count, then your grand summary is alone on the last page, so switch to layout 3 ( which will push a few records onto the last page) and then print.

Posted

Hmmmm.. I should've mentioned this earlier.

This is a very intuitive solution in regards to preventing the grand summary from being orphaned, but I should've mentioned I'd also like to prevent subtotals from getting orphaned. This is because I often group records together, provide subtotals for each group, and then page break after the subtotal. I don't want the subtotal to get orphaned between pages either. For example,

Department 1

---Record 1 = $3.00

---Record 2 = $4.00

---Record 3 = $6.00

<new page>

Department 1 Total = $13.00

<new page>

Department 2

...Record 1

etc.

If the solution to prevent the grand summary from getting orphaned is that complex, I think I'll just have to explain to the customer that preventing orphaning is difficult and that I will rather just take steps to minimize it (i.e. sliding, compact records, etc.)

Posted

Another thought is to use a method for displaying subsummary fields in portals. The idea is that you create a calc field that will only display in the last record of each subsummary group. You can then set this field to slide up, eliminating the space in all the records not displaying the subsummary. As the "susummary" field will actually be in the body part of the layout for the last record of each group, it will automatically be attached to the same page as the last record.

Check out this post here for more details on the method- it was an eye opener for me. Not sure if it is any less complex than the layout solution, but always nice to add to the arsenal of solutions.

-Raz

This topic is 7788 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.