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

Count at group total 1

Status
Not open for further replies.

slim2

Programmer
Oct 18, 2001
94
0
0
I am new to Crystal reports and have tried everything without success.
I have a field, amt and date and id. I check the month and print the amt in the apporopiate column, jan feb, mar, etc. I want to print a total and the count for
each month when the id changes. I am doing this at a group break on id. Everything looks ok but I cannot get the count to work. It always gives me the count of all months or zero.

If someone can show me what to do I would greatly appreciate it.

Thanks
 
Hi "slim2"

You need a running total field.
Do following:

1.Insert>Formula Field
Make a formula by the name "rec_count" and in the formula editor choose any number field from the database table. This will be a temporary one and we will change it soon.

2. Insert>Running Total Field
Make a new running total field by the name of "run_rec_count"
In "Field to summerize" write the name of formula created in step one i.e. @rec_count
Type of summary -> SUM
Evaluate "for each record"
Reset "on change of group" , here specify the group after which you want to reset it.
Click OK
Now go to the formula rec_count, click edit and remove the database field selected in step 1. Add following
numbervar number1;
number1 := number1 + 1;

Now in you report Add the Running totals field run_rec_count where you want the count. Suppress it in the detail section and place it in group footer.

I think you got the idea, make modifications to suit your requirement.

Let me know if you have any doubts.

--PKG *************************
Pradeep Kumar Gupta
Data Warehouse Consultant.
E-Mails: pradeep.k.gupta@indiainfo.com
pradeep.gupta@morganstanley.com
 
PKG,

Thanks for the help! I find it very difficult to get any detailed information from Crystal manual or Crystal tutorial books. This forum is the only one that delivers undrestandable answers.

Again Thanks
 
Slim,

take at look at George Pack's "Crystal Reports V8.5 - The Complete Reference". Online for about $30. The best book I have seen yet. Software Support for Macola, Crystal Reports and Goldmine
dgillz@juno.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top