locked
Accessing SSRS Parameter Data Type in Custom Code RRS feed

  • Question

  • Hello:

    Is there a way to find out what the SSRS Parameter Data Type is in Custom Code?

    For example (https://technet.microsoft.com/en-us/library/dd255264(v=sql.105).aspx):

    =Parameters!<MultivalueParameterName>.IsMultiValue

    =Parameters!<MultivalueParameterName>.Count

    =Parameters!<MultivalueParameterName>.Value(0)

    What is the equivalent to something like the following?

    =Parameters!<MultivalueParameterName>.DataType

    or

    =Parameters!<MultivalueParameterName>.Type

    How can we find out dynamically in the Custom Code if the Parameter being passed in is of type "Text" or "Date/Time"?

    Thank you in advance!

    Thursday, August 27, 2015 11:03 PM

Answers

  • Hi yosedesh,

    In Reporting Services, when we create a report parameter, we must define its data type. If it’s a single-value parameter, without “Allow multiple values” selected, the data type of the parameter is the same as we defined in report parameter properties. If we allow “Allow multiple values” selected, then it’s a multivalve parameter. At this time, the parameter data type is an array, data type of each value contained in this array is the same as the data type we defined in report parameter properties. Besides, the report parameter doesn’t contain the syntax to return data type, all syntax to reference parameter are listed in the article mentioned in your post.

    If you have any question, please feel free to ask.

    Best regards,
    Qiuyun Yu


    Qiuyun Yu
    TechNet Community Support


    Friday, August 28, 2015 9:46 AM