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!

Counting within Groups ???? 2

Status
Not open for further replies.

Ezeasy

MIS
Feb 7, 2002
37
US
I’m new to Crystal Reports but with some help and guidance I might be able to do this.
I need to create a statistical summary report based on monthly records stored in an Access database. In the table are these fields.
DATE
CATEGORY (Only 2)
PROCEDURES (10 types)
OTHER PROCEDURES (6 types)

I need the format to look like this: The only thing this is doing is counting Procedures for a month based on date can someone help me do this?
JAN FEB MAR APR ………………….
Category:
S 20 12 10 15
A 0 1 2 0
Procedure:
Proc1 5 6 3 8
Proc2 0 2 0 3
Proc3 15 5 9 4

Other Proc:
Testa 2 0 3 1
Testb 0 0 0 0
Testc 1 1 0 2

Total: 23 13 12 18


If more information is needed please ask.

Thanks in advance.
 
I would try doing each of these sections as a cross-tab with columns for each month and rows for each value in the appropriate field. Ken Hamady, On-site Custom Crystal Reports Training & Consulting
Public classes and individual training.
Guide to using Crystal in VB
tek@kenhamady.com
 
Thanks ken,
Two more I hope easy questions.
1) Would I be able to make this into one report after creating these cross-tab?
2) How can I show the remaining (procedures & Other Proc) with 0 actions if no records?

Thanks
 
Don't use the cross-tab expert. Create a report that inlcudes the records and insert cross-tab objects in the Report footer. You can add as many as you want.

True cross-tabs can only have rows/columns if there is at least one record.

To show all cells, even those with zeros, you would have to use a different technique - and create a separate conditional grand total for every cell. This is described in faq149-243 and requires one formula and one grand total for every cell (or one running total with a condition). Ken Hamady, On-site Custom Crystal Reports Training & Consulting
Public classes and individual training.
Guide to using Crystal in VB
tek@kenhamady.com
 
I tried what you suggested and created a separate conditional grand total for every cell, which looks good. I also created a group by date that works. But how do I get my dates to go across the top? Any suggestions?
 
Grouping by date won't help with the grid, because that will go down not accross. You will have to create a separate set of formulas (a column) for each month. Instead of hard coding each month you could create rolling month formulas calculated to be one month after the previous column and use these to be the condition for that column. 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