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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

supress on last record 2

Status
Not open for further replies.

Lhuffst

Programmer
Jun 23, 2003
503
US
Hi. I am using cr xi and have a question on groups. Can you suppress a group footer only at the end of a report and not just at the end of the group?

I have:
GH1: Date by year (supressed)
GH2: EmpName
GH3: Date by month (suppressed)
GH4: Date by day (suppressed)
Details (suppressed)
GF4: data
GF3A: has totals for future but is suppressed right now
GF3b: -------------------------------------
GF2b: Totals for employees
GF1: Overall Totals for all employees collectively.

Report works as needed but I would like to supress GF3B only when all the records have been displayed. I am not sure where or what code to use to accomplish this.
[blue]
Current report looks like:

User 1
1/1/09 1 7% .....
1/3/09 2 9% .....
---------------------------------------
2/1/09 1 7% .........
Totals ========
4 10% ........
User 2

1/1/09 1 7% .....
1/3/09 2 9% .....
---------------------------------------
2/1/09 1 7% .........
Totals =======
4 10% ........

User LastOne
2/1/09 1 7% ........
---------------------------------------- [red] I want to remove this line at the end of the report [/red]
Totals ========
1 7% ............
Overall 9 12% ...........
[/blue]


Code:
on the group footer 3b in the section expert suppress (x+1)formulat I used:

not onlastrecord and
{Command.LASTNAME} <> next({Command.LASTNAME})

Can anyone see what I'm doing wrong.
As always thanks for the help. Without this site, I would never have learned as much as I have. I constantly learn new things through all the posts. You guys don't get enough credit!
Lhuffst
 
Your formula is the condition to SUPPRESS the section.

Thus lastrecord will not meet that.

Try

onlastrecord

Ian
 
Move the line to GF3_c and then format that section as Ian suggested. You can adjust the height as necessary.

-LB
 
thanks to both of you. I did what you suggested. Made a GF3_c and moved my line there. On the x+2 suppress, I put onlastrecord.

This leaves the dashed line before all of the totals lines. If I change it to not on last record, then I have the same thing that I showed before. Did I put the formula in the correct place?

Is there a way to tell if you are on the last record of a group where the group will not be starting again? I would like to make sure that my total line doesn't end up on a page by itself.

thanks again to both of you.
 
LBs suggestion should work. Try adding

whileprintingrecords;

to top of formula

Ian
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top