Optional Campaign Fyear parameter

I've got an ssrs report with an fyear parameter that I'm trying to change so it's optional. In the stored procedure I've got where fyear=@fyear or @fyear is null. When I run the procedure with null for @fyear I get all campaigns regardless of fyear (this is what we want). When I refresh the dataset in BIDS I get the same results. But when I preview the report, if the fyear parameter is null, I get only campaigns that have a null fyear. I can see why that would be the case based on my syntax but I don't understand why the report wouldn't display the same results as the procedure. What am I doing wrong?

  • Former Member
    Former Member $organization

    In your SSRS report have you set a default value for this parameter as NULL? Check that you don't have any default value set for that parameter.

    It may also be worth doing a SQL Profiler trace on the actual SQL being sent to the DB.

    HTH

    Christine

  • Thanks for the reply. I had run a trace and it was passing what I thought it was.

    I ended up figuring it out. (I did not create this report) It turned out there was some not-so-obvious formatting conditionally hiding parts of the report in a way I didn't expect or want and hadn't initially looked for. Once I changed that everything showed up the way I expected.