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!

Still a newbie.. How can I displ

Status
Not open for further replies.

flojos1999

Programmer
Jan 2, 2003
5
US
Still a newbie..

How can I display the group total on the last group record?

Example:

Product Price Group Group Total
abc123 $5.00 one
cbd123 $6.50 one
cde345 $2.00 one
abc456 $1.50 one $15.00
bcd321 $2.00 two
bgr344 $1.00 two $3.00
bgr455 $10.00 three $10.00


Thanks for your help
FLOJOS1999

 
I assume that you mean you want a total of the group totals?

And I'll assume that this is a CR group, and not just a field name in your table, as your example has the group total in the example above.

Right click the field that you wish to get a grand total for and select insert->Grand Total.

-k kai@informeddatadecisions.com
 
I got the totals, but I want the totals for the group to display only if it is the last line in the group. I also want the total to display on the last line in the group like the example.

Thanks for you help
FLOJOS1999
 
Hi

Try this one..

1)Select Group Total and Go to the format editor by right clicking and select the format option in the context menu.

2)Select the suppress option and enter the following conditional formula {Group Field}=next(Group Field )

3) This will suppress all the other instances of group total except the last one.

Regards
Krishna Kumar
 
By definition, a group field does not display in the details section. Are you using running totals? Software Sales, Training and Support for Macola, Crystal Reports and Goldmine
dgilsdorf@mchsi.com
 
dgills, I am using running totals.

Krishna,

I created a group totals and tried your suggestion and It displays the last group line with the group totals but I get duplicate info on the end from the details section.

Example:

Product Price Group Group Total
abc123 $5.00 one
cbd123 $6.50 one
cde345 $2.00 one
abc456 $1.50 one <---duplicate of the one below
abc456 $1.50 one $15.00
bcd321 $2.00 two
bgr344 $1.00 two <---duplicate of the one below
bgr344 $1.00 two $3.00
bgr455 $10.00 three <---duplicate of the one below
bgr455 $10.00 three $10.00

Thanks for your help
 
Here is what I ended up doing.

Created a forumla field, the value of which is simply the summary field itself, then stuck the formula field into the detail area.

Of course, what you're left with is the group total on every detail line, so you have to conditionally suppress the formula field with the following:

If (NextIsNull ({grouping-field})) Then False
Else
(Next ({grouping-field}) = {grouping-field})


FLOJOS1999
 
Hi FLOJOS1999

Glad to knoe that you got the answer. Could you please tell me whether the group field for row, which displays duplicate value,was null?

Can somebody explain why my suggestion failed?

Regards
Krishna Kumar
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top