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!

Cross-tabs, groups, several running totals....Help needed!

Status
Not open for further replies.

Duckie66

Technical User
Nov 12, 2003
19
FI
Hi!

I'm beginning Crystal 9.0-user and I'm badly needing help with running totals and cross-tabs.
I have three groups in my report: group1 for year, group2 for month and group3 for single source output. I'd like to sum single sources to month-output and months to year-output - quite simple, right :)
The single output consists of values for each day in month. Single sources can be up to 8 in a raport. I'm calculating average with running totals for each day in each single source (running total for data and day-count).
This part is currently working well. Now I'd need to sum these values from each output to month-output. Output in group2 could be something like this: (with 4 sources)

1 0,2
2 0,1
3 0.25
4 0.5
-------------
Total 1,05

As far as I know, cross-tab isn't cabable to handle this sort of situation. How could I sum the data which is handled after group2 to a cross-tab-formation? Any ideas..?

-Duckie

P.S. I have to apologize my terrible english, especially in these database-terms - just have to wish that someone got the glue... =/
 
You might try creating a couple of formulas that evaluate to Month and Day. As long as the formulas do not use variables you should be able to add these to your cross-tab report.

e.g.

Code:
//Month
Month({dateField}) <- where {dateField} is the field containing the date

Add this completed formula to your cross-tab via the Cross-Tab expert. Be sure to place it in the proper order within the Cross-Tab.
 
Crosstabs probably won't lend themselves well to this, but you're better served to post technical information, especially when there's a language barrier:

Database/connectivity used
Example data from the database
Expected output

If you're trying to sum values from a group level, you might be better served using aggregate formulas rather than running total formulas.

At any rate, to sum the values at group 2 for use by group 1, the 3 formula method works well:

group header 1 formula:
numbervar TheSum:=0;

group header or footer 2 formula:
numbervar TheSum:=TheSum+average({table.field},{table.group2field});

Group footer 1 formula to display results:
numbervar TheSum

-k
 
Beanbrain, Please note that you have revived a post from over a year ago. I don't think we know whether duckie66 still has an issue. If so, duckie66 should provide the planned columns and rows for the crosstab and explain why he/she can't use inserted summaries for the average.

-LB
 
lbass. You are quite correct, however I've found solutions to my own issuses from even farther back than a year ago. So, as I'm browsing around for solutions if I find a post that I've solved I'll post that solution.
 
I can see you really want to do this, and when I first started using the forum, I did it myself once or twice, but please note that reviving old threads is generally frowned upon. If you have a great idea that you want to share, you can write an FAQ or create a new thread highlighting your idea. Usually if an issue is significant it will recur and there will be plenty of opportunities to respond with your solution in a current thread.

-LB
 
lbass:

Please advice on writing a FAC. I've been a member of this forum for quite some time, but have not had the need or opportunity to write such a thing.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top