Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Orphaned Summary Line 1

Status
Not open for further replies.

mzimmpa

Programmer
Feb 16, 2003
9
0
0
US
Hello,

Once again I turn to the experts!

I have a group with a couple of Group headers, a details section and a Summary (of one field) in the Group footer.

Problem is, all the detail records print on the first page, but then the Summary gets printed on the final page by itself.
I want to include ONE record with the summary should the report stretch to 2 pages.

I.e. If the last row printed on page one is the last record,
print that final row on page 2 along with the summary.

I do not want to see page 2 with only the summary at the top, the final record must accompany it to the second page.

Any ideas?

Thanks,

mzimm
 
Copy your detail fields into the group footer and then go to format section->details->suppress->x+2 and enter:

recordnumber = count({table.groupfield},{table.groupfield})

This will suppress the last detail in the details section, since the last detail now appears in the group footer.

-LB
 
LB* -

Great idea, I was trying to come up with a solution for this one. The only problem is that recordnumber will keep accumulating across the whole report and

count({table.groupfield},{table.groupfield})

will reset on every group.

If you you use this, it works as mzimm was looking for:

onlastrecord or next({Customer.Customer ID}) <> {Customer.Customer ID}


~Brian
 
Good catch, Brian--the formula should be:

{#cntwingrp} = count({table.groupfield},{table.groupfield})

where {#cntwingrp} is a running total of {table.groupfield}, count, evaluate for each record, reset on change of group.

-LB
 
It worked GREAT!!

Very ingenious solutions.

Thanks you very much guys!

Sincerely,

Mike Z
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top