Crystal Reports - User Parameter Settings

Options
I have a constituent export in RE that exports 4 different gift summaries and all events. 

The gift summaries are working great because my filter can be the dynamic "this fiscal year".



The event portion does not allow for "event start date = this fiscal year" so I am exporting all events.

I have a formula in the event portion of the report:

IIF({CnPrt_1Ev.CnPrt_1Ev_Start_Date} in DateTime(2014,12,01,00,00,00) to DateTime(2015,11,30,00,00,00) AND {CnPrt_1.CnPrt_1_Attended} = True,1,0)



I would like to make a report parameter that prompts the user "what fiscal year" and when they type in 2015 or 2016 then the report would only count those events.  Our fiscal year runs from 12-1- through 11-30.  Is there a better way to make the event portion dynamic so I don't have to update the formula each year? Which is EASY to forget to do, but CRITICAL that I don't because this is a board report.



 
Tagged:

Comments

  • Assuming you've created a numeric parameter called {?PARAMETER} where the user will enter or select the year:



    IIF({CnPrt_1Ev.CnPrt_1Ev_Start_Date}

    in DateTime({?PARAMETER},12,1,0,0,0) to DateTime({?PARAMETER}+1,11,30,0,0,0)

    AND {CnPrt_1.CnPrt_1_Attended} = True,1,0)




    or if {?PARAMETER} is a string parameter:



    IIF({CnPrt_1Ev.CnPrt_1Ev_Start_Date}

    in DateTime(val({?PARAMETER}),12,1,0,0,0) to DateTime(val({?PARAMETER})+1,11,30,0,0,0)

    AND {CnPrt_1.CnPrt_1_Attended} = True,1,0)




    You may want to restrict the parameter values to a set list of years, or enforce minimum/maximum values.

Categories