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!

Prior Year Values need to be changed based on Prompt Value

Status
Not open for further replies.

karnd

Programmer
Feb 1, 2003
190
US
Hi,

I need to populate the prior year performance numbers based on the prompt value on the report, i.e.

Eg:I have the prompt on the report so when i select MonthYear=March,2005 then in the report i have few prior year fields(let us say 4 fields, CurrYear-1,CurrYear-2 and etc) which will be changed to the selected prompt value.

The structure of the report
For the Prompt Value March,2005

DeptName 2004 2003 2002 2001
==========================================================
Accounting 10% 20% 25% 15%
Finance 5% 10% 12% 18%
---
----

==========================================================

But when the Prompt value changed to other like Jan,2004 then the respective Prior Performance value need to pull and field headings also need to be changed based on the chosen prompt value.
i.e.For the Prompt Value Jan,2004

DeptName 2003 2002 2001 2000
==========================================================
Accounting 1% 2% 5% 3%
Finance 5% 1% 2% 8%
---
----

==========================================================

i am new to Crystal please!
Appreciates of your kind help.

Thanks in an advance

Regards,


 
It sounds like you're building a manual rolling period report.

Without any technical information, my responses are limited:

Crystal version
Database/connectivity used
Example data
Expected output

Typically one would reference the parameter in formulas to limit the rows used in any aggregate formulas, as in:

//year1
val(right({?MyParameter},4))-3

//year2
val(right({?MyParameter},4))-2

//year3
val(right({?MyParameter},4))-1

//year4
val(right({?MyParameter},4))

Then if you use any Running totals, you can use the same logic against any dates in the evaluate use a formula, as in:

year({tabledatefield} = {@year1}

etc.

-k
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top