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!

Percentage on cross tabs

Status
Not open for further replies.
Nov 23, 2006
22
GB
I'm sorry if this is so simple, but I am quite weak on cross tabs.
I am trying to create a report showing the following:-

A 50(DISTINCT COUNT OF "WO_NO" - IN SUMMARY)
10 (SUM OF FORMULA CALLED "@IN TIME" - IN SUMMARY)
20% (FIELD I NEED TO CREATE)
B 100
60
60%
C ETC

I can distinct count and sum in the summarised fields but can't work out how to create the %.

I am on oracle database, CR9

Thanks

Charlie
 
Here is one approach, which uses the formula areas for formatting to create variables.

Select the distinctcount summary in preview mode->right click->format field->common tab->suppress->x+2 and enter:

whileprintingrecords;
numbervar tot := currentfieldvalue;
false

Select the {@Intime} summary and right click->format field->common tab->suppress->x+2 and enter:

whileprintingrecords;
numbervar cond := currentfieldvalue;
false

Add a third summary of any kind, e.g., add the first summary again. Then right click->format field->common tab->DISPLAY STRING->x+2 and enter:

whileprintingrecords;
numbervar cond;
numbervar tot;
if tot > 0 then
totext(cond%tot,2)+"%" //2 for two decimals

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top