SSRS DataSet Parameter Name Conflict RRS feed

  • Question

  • User-533827640 posted

    Hello All,
       I'm building a SSRS report that involves multiple datasets, each associated to unique stored procedures.  Within the stored procedures, the parameter names are unique.  However, many of the stored procedure parameters that in turn become report parameters, have the same name.  
    For example, @userid is common to all the stored procedures, so it's handy that the value for the report parameter @userid will be used in all the SP's associated with the datasets.  However, now I'm stumped because Dataset X uses StoredProcedure_1, which declares @FUTURE and for Dataset X, @FUTURE needs to be set to 'true'.  Dataset Y uses StoredProcedure_2, which declares @FUTURE and which needs to be set to 'false'.  
    So I have one report input parameter @FUTURE, that needs two different values. Yikes!  

     Is there a way to change a DATASET parameter name so that it will be unique to the report, but will still populate the @FUTURE value for the stored procedure?  I do not want to change the SP parameter names, as they are being used in production. 

    While I'm on the subject, all of the SP's return OrderCount, so each DataSet has OrderCount as a Field.  Are there any potential conflicts with using the same field name for different Datasets?

    Sunday, March 17, 2013 11:19 AM

All replies

  • User-96295490 posted


    You need not change the stored procedure, if you can copy the entire stored procedure query and change the parameter name according to your need.

    You have to take the query and in the dataset edit it as text and change the parameter names.

    This will help you to add default values to the parameters and run the dataset.

    Hope it helps.



    Friday, May 3, 2013 6:38 AM