Parameter for Picking from Two Different Types of Date Ranges

  • Hello all,

    I'm trying to set two - optional parameters - one for calendar year and one for sales year. The user needs to pick dates that are either a Calendar Year or a Sales Year. The code works in the query allowing a null value for either but not both, but when run in the report, it wants paramaters for both.

    Here's the dataset code:

    ...and (YearVal In (@CalYear) or FYearShortVal In (@SalesYear))

    Parameters are both set to multivalue and allow blank value. The available values are hand entered (specify values) - for example - in the Sales Year, the first label is 09/10 and the text value is 09/10, etc. for five entries, Calendar Year is similar - 2009, 2009, etc. I tried adding a blank label and empty value (not null or 0) to each of the value lists, but that didn't work either.

    What am I missing?

    Thank you.

    JNM

  • Could you use the ISNULL function like:

    ...and (YearVal In (ISNULL(@CalYear, 0)) or FYearShortVal In (ISNULL(@SalesYear,0)))

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply