locked
dropdown values RRS feed

  • Question

  • Hi,
    I am creating a simple report in SSRS 2008.
    The problem is on one of the parameters...
    The report is populated from a stored proc i.e. uspReport.
    This stored proc takes two parameters as follows:
    @RequestID int = 0 and @System tinyint = 0

    The @System parameter is a dropdown on the report which is populated from a stored proc called uspSystemsGet which retrieves values like:

    SystemID      SystemName
    0                  ALL
    1                  x
    2                  y

    The dropdown is set to datatype of integer and also set to allow null values i.e. the check box is ticked for this.

    Question:
    On running the report, I place a value for the @RequestID and choose a value from the dropdown but the error message is:

    Error converting data type nvarchar to tinyint.
    I checked in the sql profiler and noticed that for the parameter @System = N'@System'

    What am I doing wrong please?

    Thanks

     

     


    • Edited by arkiboys Friday, November 18, 2011 1:02 PM
    Friday, November 18, 2011 12:58 PM

Answers

  • I have solved the problem which was to do with the [] around the parameter.
    Thank you
    • Marked as answer by Elvis Long Friday, November 25, 2011 9:23 AM
    Friday, November 18, 2011 2:32 PM

All replies

  • The @System parameter is a dropdown on the report which is populated from a stored proc called uspSystemsGet which retrieves values like:

    SystemID      SystemName
    0                  ALL
    1                  x
    2                  y

    The dropdown is set to datatype of integer and also set to allow null values i.e. the check box is ticked for this.

    Hi,

    In parameter property page, in Available Values tab

    Set Value Field =  SystemID and Label field = SystemName.

    Regards.

    Friday, November 18, 2011 1:07 PM
  • Yes, I have that already.
    Still getting the same error.
    Friday, November 18, 2011 1:12 PM
  • Hi,

    Check with parameter mapping in dataset property.

    Parameter value should have - =Parameters!System.Value expression.

    Regards.

    Friday, November 18, 2011 1:20 PM
  • parameterName is @System
    parameter value is @System

    problem still remains.

    Friday, November 18, 2011 1:26 PM
  • parameter value is @System

    Click on expression button (Fx) next to it.. what does it shows?
    Friday, November 18, 2011 2:23 PM
  • I have solved the problem which was to do with the [] around the parameter.
    Thank you
    • Marked as answer by Elvis Long Friday, November 25, 2011 9:23 AM
    Friday, November 18, 2011 2:32 PM