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

Year growth crosstab 1

Status
Not open for further replies.

hlmnsbuggy

Technical User
Mar 25, 2002
72
US
CR11, Oracle database

I have crosstab has been design as following

On column field, I put group by periods, on summarized field, I sum amount
2005 2006
Revenue$ revenue$
Expense $ expense$

Now I need to add column to show year growth in this crosstab. By reading previous posts, I need to declare value and do some sort display string over format editor. But I have never done those before. Would you please help me how to declare value and do calculation growth % in crosstab?
Thanks!!

Ann
 
Are there two comparisons then? One comparing revenue 2005 with revenue 2006, and one comparing expenses 2005 and 2006?

Select the revenue summary->right click->format field->common tab->suppress->x+2 and enter:

whileprintingrecords;
currencyvar rev2005;
currencyvar rev2006;
if gridrowcolumnvalue("table.year") = 2005 then
rev2005 := currentfieldvalue;
if gridrowcolumnvalue("table.year") = 2006 then
rev2006 := currentfieldvalue;
false;

This assumes that you have a field {table.year} that you are using for your column field. You remove the curly brackets and replace with quotes in the gridrowcolumnvalue function. If instead your column field is a date, replace the function with:

year(gridrowcolumnvalue("table.date"))

Create a formula {@0}:
whilereadingrecords;
0

Add this as your third summary field. Then in preview, select the summary->format field->common tab->display string->x+2 and enter:

whileprintingrecords;
currencyvar rev2005;
currencyvar rev2006;
totext((rev2006-rev2005)%rev2005,2)+"%"

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top