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

Running totals with cross-tabs, 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... =/
 
Please show us how you want the report to look. From what you've said so far, I can see no need for using a crosstab or running totals. It looks like you could right click on your "source" field and insert an average at each group level and at the report level. So I think we need more information to be of help. What do you want to show as your crosstab columns and rows? How should the report look? Why do you need to use running totals?

-LB
 
ok,

In the morning my question seems to be so... empty :) Maybe I could tell something facts too..

I have a cross-tab in group3. It includes 24 hours (columns) for every day (rows) in the month so I cannot use a normal 'crystal-average' because it counts average for each hour. That's why I'm using running totals.. Maybe variables in details-section could be solution too but then I'd have to filter out wrong months and inputs... And no idea how to do that in a simple way:)

I want to show averages from each output separately in month output (as told in a first message) and sum them then together.

Any help for you, Ibass?

-Duckie
 
I'm not sure I understand your crosstab design, but it seems like you could use {table.datetime} for your column and then select it, choose group options, and set it to "hourly", and for the row, use the same field, setting it for "monthly". Then you could insert an average for the summary. This would result in the average number of X per hour per month. Is that what you are looking for?

As far as I know, it is not possible to use running totals with crosstabs, unless you are creating a manual crosstab.

-LB
 
Ok, I Hope I'd learn to ask something clearly sometimes.. We'll see :p

Group3 Crosstab Input1:
1 2 3
1.10.02 2 0 0
2.10.02 3 0 2
3.10.02 2 2 1

etc...

Count of rows is something between 1-31 in every summary so it have to find out before calculating... Currently I'm doing that calculation with distinctcount running total.. So average is sum of daily values/sum of hours (=average hour). And as mentioned before, that part is currently working well with each input.

Now I should make a summary of averages in these inputs to group2 (=month). I'm expecting something like this:

Input 1: 0,2
Input 2: 0.3
Input 3: 0.5...

etc..

The only problem is that I cannot get the exact number of rows (hours) from anywhere. I have values in samples which are taken in 'random' intervalls.. So I don't know exactly how many hours are in the month. I could take it somehow with count({field}, {field}, "monthly") but I haven't figured out how to change that value to hours.. and how to print it in expected formation...

Ideas? :)

-Duckie
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top