i need to create a crystal report for user to print the month end data. but now i facing some issue on writing formula code.
i create parameter field allow user select either "Current period", "previous period 1" and "previous period 2".
when user select "current period" in parameter field, the report title will show out the date of this month end, if user select "previous period 1" then report title will show out the date of previous month end.
Example:
Current month is
October 2009
Users print this report on
15/10/2009.
If users print trial balance as of
current period, report title will show out “31 October 2009”
or show "31/10/2009"
If users print trial balance as of
previous period 1, report title will show out “30 September
2009”
or show "30/09/2009"
If users print trial balance as of
previous period 2, report title will show out “31 August
2009”
or show "31/08/2009"
May i know how to write a formula on this issue?
*the coding i write currently as below:
select {APAgedTrialBalanceReport/QueryOptions.ReportAsOf}
case 'C':
ToText (PrintDate) <-this on can show the print date
case 'P1':
"XXX1" <- temporally hard code because don't know how to write code?
case 'P2':
"XXX2" <- temporally hard code because don't know how to write code?
Thank you.
Edited by skyfox - 14 Oct 2009 at 6:19pm