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!

Help with formula, just want a Year Parameter 1

Status
Not open for further replies.
Dec 27, 2002
167
US
CR 8.5, Oracle 8.174 ODBC Driver.

I have a crystal report that was hard coded. I am trying to edit the report to make it dynamic

There are 13 columns, one for each month and one for YTD
________
If {RECEIVABLE.INVOICE_DATE} in DateTime (2004, 01, 01) to DateTime (2004, 01, 31)then ({RECEIVABLE_LINE.QTY} * ToNumber ({PART.USER_1}))else 0
_______
Their is a formula for each month where it changes the above date period to proper reflect the time frame (above is for Jan 2004. So if you want the formula for June, you would manually change the from to (2004, 06, 01) and the to would be (2004, 06, 30).

Not a big deal to change the report for the change of the fiscal year, all I do is open the report and change the year twice for each formula, at total of 26 changes.

What I want to do is create a parameter (a sting Paramater) that would prompt for the Year in YYYY format,
Then replace the Year with the Paramater.
So it would look like this.
___________________
If {RECEIVABLE.INVOICE_DATE} in DateTime ({?ReportYear}, 01, 01) to DateTime ({?ReportYear}, 01, 31)then ({RECEIVABLE_LINE.QTY} * ToNumber ({PART.USER_1}))else 0
___________________

Suggestions... I am familiar enough with CR, but I never received offical training so I never can determine the correct syntax and rely on trial and error, and referencing other reprots.
 
You need to set up the parameter as a number parameter. Other than that, your formulas should work fine.

-LB
 
Worked like a champ...

It looked right, I was just missing 1 thing.

Thanks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top