none
Failed to convert parameter - a String to a Boolean.

    Question

  •  

    I have a Stored Procedure with roughly 20 parameters - within SQL I can execute (with populated parameters) the Procedure without issue.  When I try to run the same Stored Procedure within VS2005 ([filename].rdl) the procedure fails with the following errror;

     

    Failed to convert parameter value from a String to a Boolean. (System.Data)

     

    I'm using the exact values to populate the parameter in both cases.  The 'Advanced Information' window provides me with no specific information about which parameter is causing problems.  I have compared the 'Data Type' property within the .rdl file defenition to the data types defined withing the Stored Procedure.

     

    Any ideas/suggestions/help...etc... would be appreciated.

     

    Thank you for your time.

     

    Peter 

    Monday, July 21, 2008 9:30 PM

Answers

  • Peter,

     

    One workaround. Change the sproc to take the Boolean parm as varchar and you convert it to bit at the beginning of the stored procedure.

     

    Tuesday, July 22, 2008 12:35 AM

All replies

  • Peter,

     

    One workaround. Change the sproc to take the Boolean parm as varchar and you convert it to bit at the beginning of the stored procedure.

     

    Tuesday, July 22, 2008 12:35 AM
  • I have the same problem, but i dont pass a parameter (it is not defined as a parameter in the list of parameters because sometimes i need to pass 1 and sometimes 0 and it is set in the data source), but just a value in the list of parameters for the data source.
    And even when i give the parameter a default value in the procedure and dont pass the parameter from the report at all the error still shows... Any other solution for this?
    Thursday, August 07, 2008 7:44 AM
  • When testing stored procedures containing boolean parameters from VS / SSRS, you need to use True/False as opposed to 1/0.

    So when you test the stored procedure in SSMS, you would use EXEC [MyStoredProc] 'TestVarCharParam', 1

    And from VS / SSRS you would use execute the stored procedure, and use 'TestVarCharParam' for the string parameter, and then True for the boolean parameter...

    hopefully that will help

    Cheers

    Tuesday, April 14, 2009 5:42 AM