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

Show total of Group's record in the group Header ??? 2

Status
Not open for further replies.

vlad2

Programmer
Jan 9, 2002
56
US
I want to show all customers with their vehicles, grouped by customerID. I'm able to display total of 'ServiceCharges' field( based on group selection) in group footer.But I want to display the total in Group Header, how i can do that?

thanks for any help
 
if i drag the Total to Croup header for first group i have 0.00 value, and for second and so on i have totals of the previos group.

It does not work
 
i used varibles to manually count
here the steps:

I Created new formula fields.
1 'IniTotal'
whilePrintingRecords;
Currencyvar Total := 0, Drag to group header,
Suppress this field
2'EvaTotal'
whilePrintingRecords;
Currencyvar Total;
total = total +(DBTotal)'Drag to detail section,
suppress this field
3 DispTotal
whilePrintingRecords;
Currencyvar Total;
Drag to Group Footer
 
Hmm.. Don't have time to test this morning, kinga shooting from the hip here.

How about reassigning the number to a different variable name and attempting to place that in the group header, then reset that one in the group footer Brian
 
Brian, thanks for the ideas, but it doesn't work.I got 0.00 value in the field....

 
you will get 00 because the header occurs before the activity that creates the amount that goes in there...

the amount is right when it is in the footer, correct?

how about this - put in a little cross tab in the top of the report that will bring those things in for you...
(as far as I know, the crosstab will work in the header...??)

lmc
cryerlisa@hotmail.com
 
Can you overlay the group footer so it would be displayed in the group header? I've done overlay once or twice and can't recall exactly how it works.

PFC
 
Don't use variables just use a summary operation and then you can drag the total to the group header. Software Support for Sage Mas90, Macola, Crystal Reports, Goldmine and MS Office
 
Do you mean use RunningTotal fields?

Can anybody give me an example?

Thanks..
 
Running totals V8/V8.5 - Insert, field object, running total field and follow dialog box, it is very straightforward.

Running totals V7 - Insert, running total field, and follow the ball.

Running totals not available prior to V7, you must use variables withthe 3 formula technique, check the FAQ section for details. Software Support for Sage Mas90, Macola, Crystal Reports, Goldmine and MS Office
 
Running Total fields don't work in the Group Header section. They have to be in the Group Footer.

You need a Sumamry Field as suggested earlier.
Place your field in the details section
Right Click - Insert Summary
The summary field will be inserted in the group footer but will also work in the group header section. Editor and Publisher of Crystal Clear
 
Thanks... The Insert Summary works just perfect.
Here is my Problem:
I need to display Sum of all records and i can do it..
i need also to display sum of all records for the CURRENT YEAR

How and where i can sort the records by date and get sum of all rec for the current year???

thanks for help..


 
Create a formula that is:

If {datefield} in YearToDate
then {Amount}
else 0

Then use Insert-Summary on this field.
This will land in the footer, but can be moved to the header. Ken Hamady, On-site Custom Crystal Reports Training & Consulting
Public classes and individual training.
Guide to using Crystal in VB
tek@kenhamady.com
 

if ERCHistory.PostedDate}) in YearToDate
formula = {ERCHistory.Total}
else
formula = 0
end if
It did not worked, i got results - 0.00

then i modified the formula:

if year({ERCHistory.PostedDate}) = year(currentdate) then
formula = {ERCHistory.Total}
else
formula = 0
end if

It works!!!! Thanks a lot for Idea
Will i have a problem With Year(CurrentDate)???

Can you give me an example of: How to Send parameters(date range) to report which is created based on StoredProcedure which takes two param FromDate and ToDate.
 
The difference is that your technique will inlcude any records after today, because they are not YTD. However, those records may not exist. Post your SP question as a new question in the integration forum. Ken Hamady, On-site Custom Crystal Reports Training & Consulting
Public classes and individual training.
Guide to using Crystal in VB
tek@kenhamady.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top