I'm using Crystal Reports 8.5 and I've written a stored procedure for my data. It comes from a financial data source that can be selected by period, not time but numerical (period 01, period 02, etc.). In my report I have a parameter field where the user can select the period they want to see. My problem is this: I wrote a formula to grab the previous time period and display with the time period the user selects but I'm just getting blank info when I view the report. The formula is like this:
if {GL_DETAIL_04;1.Period} = 'October' then {GL_DETAIL_04;1.Period_1}
else if {GL_DETAIL_04;1.Period} = 'November' then {GL_DETAIL_04;1.Period_1}
else if {GL_DETAIL_04;1.Period} = 'December' then {GL_DETAIL_04;1.Period_2}
else if {GL_DETAIL_04;1.Period} = 'January' then {GL_DETAIL_04;1.Period_3}
else if {GL_DETAIL_04;1.Period} = 'February' then {GL_DETAIL_04;1.Period_4}
else if {GL_DETAIL_04;1.Period} = 'March' then {GL_DETAIL_04;1.Period_5}
else if {GL_DETAIL_04;1.Period} = 'April' then {GL_DETAIL_04;1.Period_6}
else if {GL_DETAIL_04;1.Period} = 'May' then {GL_DETAIL_04;1.Period_7}
else if {GL_DETAIL_04;1.Period} = 'June' then {GL_DETAIL_04;1.Period_8}
else if {GL_DETAIL_04;1.Period} = 'July' then {GL_DETAIL_04;1.Period_9}, etc.
The Period fields contain numeric data. Any ideas??
if {GL_DETAIL_04;1.Period} = 'October' then {GL_DETAIL_04;1.Period_1}
else if {GL_DETAIL_04;1.Period} = 'November' then {GL_DETAIL_04;1.Period_1}
else if {GL_DETAIL_04;1.Period} = 'December' then {GL_DETAIL_04;1.Period_2}
else if {GL_DETAIL_04;1.Period} = 'January' then {GL_DETAIL_04;1.Period_3}
else if {GL_DETAIL_04;1.Period} = 'February' then {GL_DETAIL_04;1.Period_4}
else if {GL_DETAIL_04;1.Period} = 'March' then {GL_DETAIL_04;1.Period_5}
else if {GL_DETAIL_04;1.Period} = 'April' then {GL_DETAIL_04;1.Period_6}
else if {GL_DETAIL_04;1.Period} = 'May' then {GL_DETAIL_04;1.Period_7}
else if {GL_DETAIL_04;1.Period} = 'June' then {GL_DETAIL_04;1.Period_8}
else if {GL_DETAIL_04;1.Period} = 'July' then {GL_DETAIL_04;1.Period_9}, etc.
The Period fields contain numeric data. Any ideas??