Passing Multi-Value OR ALL as a parameter Question

  • I have a situtation like this. For a report I have to pass 6 parameters. Out of 6 parameters I can either pass one or all the six parameters to render a report. The tricky part lies here : The first two parameters are DateTime for which I can set "Allow Nulls" and rest all four parameters are "Multi-Value" parameters and I believe I cannot set "Allow Nulls".

    To satisfy my requirement I should be able to select either One or Two or all parameters.

    Please shed light on this issue and help me to understand as to how do I make the Multi-Value propery as "Allow Null."

  • Hello,

    Do you mean that the multi-valued parameter is a varchar with a comma(,) delimited values? if so, then you can go ahead as

    @parameter1 datetime = '', @parameter2 datetime = '', @parameter3 varchar(8000) = '', @parameter4 varchar(8000) = '', @parameter5 varchar(8000) = '', @parameter6 varchar(8000) = ''

    For the condition, you need to make sure whether the passed parameters consists of any values or none.

    Hope this helps out.

    Thanks

     


    Lucky

  • The Multi-Valued parameter is a string. I am fllling all the four parameters with their datasets, which work fine.

    My Question  : Is it mandatory to select atleast one value from each Combo Boxes to run a report.

    If its mandatory, then I am in trouble. If I do not select any value from a combo box and then if I press View Report button it gives me a message "Please select parameter1 from the list."

    I want to pass the parameters which I want to.

    Please help.

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

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