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

Can I Summarize a Summary? 1

Status
Not open for further replies.

-cush-

Programmer
Feb 18, 2004
145
US
I have a report with two Groups. The Footer of Group 2 shows the Sum of numbers from the detail section. I would now like to show the median of those totals and display it in the footer of Group 1. Is this possible?
 
Yes you can. I for some reason thought I would have to do it programatically. But when you create a summary, previous summaries are available to select.
 
I was wrong that wasn't the previous summary available for me. I am still working on this. I have all of the totals from Group 2 in an array. Now I want to take that array and find the median and display it in the footer of Group 1.
 
Can't total a total in Crystal.

You can create an array variable and populate it in a group-level formula.

Then, in a report footer formula use that array to compute the median.

- Ido

view, e-mail, export, burst, distribute, and schedule Crystal Reports.
 
Yeah, that's what I'm doing. Unfortunately, I don't see a way to use the median function on an array, so I will have to sort the array and take the center value.
 
You can write query in database. I am using Oracle PL/SQL. There is median function. Write a subquery (or inner query) to get sum with groupings, then write median for outer query to get median. Make sure you have all the fields or columns you need and add it to Add Command in Crystal, then work from there.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top