locked
'Error converting data type nvarchar to int' when passing multiple INT parameters in SSRS 2008 RRS feed

  • Question

  • Hi, I have a simply report and would like to pass multiple INT value parameter (Product ID 'int') when I am running the report. When I choose the single value (Product ID), it runs well. But when I choose more than one value, in the report preview, it shows 'Error converting data type nvarchar to int' .

    Does anyone have any idea about fixing this 'simple' problem? I think maybe i need to convert the parameter in SP. But I tried 2 days and got nothing.

    Realllllly Appreciate It!!

    (I am using SQL SERVER 2008.)

    Tuesday, September 12, 2017 2:57 PM

Answers

  • Hi yxzhou624,

    When you want to pass multiple parameter values, you need to use "in"  to filter parameter instead of "="(if you use filter, you need to check the data type whether is int). Then you need to check whether the parameter type is "int" in parameter properties. if you want to pass multiple parameter, you need to choose "Allow multiple values"

    In addition, you also could add available values(specify value or get value from dataset). If you want to pass it manually instead of choose it, you could press Enter Key to seperated two parameter(pass one value, then press Enter Key, then pass another value...)

    If you have any question, please feel free to ask.
    Best regards,
    Zoe Zhi


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    • Marked as answer by yxzhou624 Wednesday, September 13, 2017 4:24 PM
    Wednesday, September 13, 2017 7:02 AM

All replies

  • You can use TVP (table valued parameter). Please see this tutorial
    Tuesday, September 12, 2017 9:43 PM
  • Hi yxzhou624,

    When you want to pass multiple parameter values, you need to use "in"  to filter parameter instead of "="(if you use filter, you need to check the data type whether is int). Then you need to check whether the parameter type is "int" in parameter properties. if you want to pass multiple parameter, you need to choose "Allow multiple values"

    In addition, you also could add available values(specify value or get value from dataset). If you want to pass it manually instead of choose it, you could press Enter Key to seperated two parameter(pass one value, then press Enter Key, then pass another value...)

    If you have any question, please feel free to ask.
    Best regards,
    Zoe Zhi


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    • Marked as answer by yxzhou624 Wednesday, September 13, 2017 4:24 PM
    Wednesday, September 13, 2017 7:02 AM