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

cross-tab percentage problem 1

Status
Not open for further replies.

koolskins

IS-IT--Management
Nov 22, 2003
79
US
I am running CR 10 against an Informix database and am attempting to generate a cross-tab report that shows totals by category by month with a corresponding percentage value that the individual category represents. However, instead of the percent being based on the sum of the seven columns that are being displayed, I need it to be the percent value of the sum of columns 1 and 2 only. The report should look something like this:

small large mnw vosb
oct,09 10000 50% 10000 50% 2000 10% 4000 20%

nov,09 15000 38% 25000 62% 3000 8% 5000 13%


Thanks,
Randy
 
I think you should just create a manual crosstab. Insert a group on {table.date} on change of month, and then create one formula for each column like this:

//{@small}:
if {table.field} = "small" then {table.amt}

Insert a sum on this at the group level and then suppress the detail section and group header, and move the groupname into the group footer. For the percentages create formulas like this, just changing the numerator in each formula:

sum({@small},{table.date},"monthly")%(sum({@small},{table.date},"monthly")+sum({@large},{table.date},"monthly"))

-LB
 
Thanks lbass. That's just what I needed.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top