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

group percentages

Status
Not open for further replies.

johnhugh

Technical User
Mar 24, 2010
702
SG
Hello,

I'm using Crystal 10 and cannot find a solution for my percentage problem.

I'm reporting on Purchase Order values by Country, by Currency.
I have three groups: 1st is Countries, then Currencies, then PO number.
I have a conditional summary field Sum ({@LineTotal},{POPORH1.CURRENCY} ) in the group footer of my currency group.
In the report footer I used a cross-tab to display report totals by currency. (I did not know how to create report totals by currencies otherwise because currencies are dynamic depending for which period the report is run)

Now I'm stuck with how to create a group percentage because I'm not sure how to refer to my report total for a specific currency in the cross tab.

The formula should be something like currency.grouptotal/currency.reporttotal*100 and should be in my currency group.

I hope I make sense.
Any advise much appreciated.

 
How many currencies are possible across report runs? Just a few or 100's? Or?

-LB
 
Hi lbass,

exactly that is my problem. I wanted to keep the report dynamic, thats why I used the cross tab in the footer.
Depending on the timeframe the report is run for I might just have purchase orders with 2 different currencies or when run over a whole year it could be 20.
 
The simplest solution might be to add a subreport that is linked to the main report on the currency field, so that the sub can total per currency. Then you can pass the total value to the main report as a shared variable in order to do the calculation.

-LB
 
Thank for your suggestion.

A sub report will work for my main report. However in my main report I allready have to subreports that calculate the PO values for month-to-date and year-to-date. I wouldn't be able to show a percentage for those because I can't add another subreport to an existing subreport as far as I know.

My report basically has 3 columns for PO values.
POs per week, per month, and per year.
POs per week is my main report. For the other 2 I have done subreports.
 
But you can pass values from each to the main report, where you can do calculations. But why are you using subreports for this? It might be easier to eliminate them and use conditional formulas to define the intervals.

-LB
 
Thanks lbass,

I'm using subreports because I did not know how to do it with conditional formulas.
Will give it a try.

Thanks for your help!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top