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!

Formula for % Change

Status
Not open for further replies.

Lisa5781

Technical User
Jul 25, 2005
5
US
In my subreport, I need to provide the % change from year to year. I have five years worth of data, but only need to report the % change on the last two years. My years are defined on certain fiscal year criteria (in it's own formulas). Can anyone help?
 
Please post technical information:

Crystal version
Database/connectivity used
Example data
Expected output

What is being compared, and at what section in the subreport?

If you're grouping by the year and the subreport is returning 5 years of aggregates, you'll use shared variables to house each and pass them on to the next group, however if the subreport is using 5 fields with the years already defined as 5 fields, the method is different.

Solutions are based on the data, there isn't a generic database.

-k
 
Crystal Version: 10.0
Database/Connectivity Used: SQL Server database using OLE connection
Example Data located in subreport report header:

FY 2001 FY 2002 FY 2003 FY 2004
Form F 1,114 1,558 1,562 675
Form SC 527 1,058 1,033 425

Expected Output:

FY 2001 FY 2002 FY 2003 FY 2004
% Change 02-03 % Change 03-04
Form F 1,114 1,458 1,562/7.1% 675/-56.7%
Form SC 527 958 1,033/7.8% 1425/37.9%

The forms are grouped by year based on criteria established in a formula.
if {FormF.CYCLE_PSTD}>= "199940" and {FormF.CYCLE_PSTD}<= "200039" then "FY 2000" else
if {FormF.CYCLE_PSTD}>= "200040" and {FormF.CYCLE_PSTD}<= "200140" then "FY 2001" else
if {FormF.CYCLE_PSTD}>= "200141" and {FormF.CYCLE_PSTD}<= "200240" then "FY 2002" else
if {FormF.CYCLE_PSTD}>= "200241" and {FOrmF.CYCLE_PSTD}<= "200340" then "FY 2003" else
if {FormF.CYCLE_PSTD}>= "200341" and {FormF.CYCLE_PSTD}<= "200439" then "FY 2004" else
if {FormF.CYCLE_PSTD}>= "200440" and {FormF.CYCLE_PSTD}<= "200539" then "FY 2005" else ""

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top