SSRS - Changed Stored Procedure Name

  • I’ve developed a report running against a “TEST” Stored Procedure. The report works fine but now I want to rename the test SP to something meaningful. I’ve updated the Data Source to reflect the new SP. I click on Refresh fields button and run the query “!” and it works fine. However, the PREVEIW tab is still expecting the old TEST SP.

    I’ve tried deleting the data source and recreating it with a new name. I get the same results: the PREVIEW tab is looking for the old TEST SP.

    Any input will be greatly appreciated. I don’t want to have to recreate the report from scratch.

    Thanks,

    Ben

  • seems the datatset name also was by default set as "Test" when it was created and the "Test"dataset name is hardcoded in some expression as the scope parameter or something?

  • Thanks for the reply. I tried deleting the *.data file and even went as far as removing all objects from the report and was left was a blank report, but the problem persisted.

    What I ended up doing was creating a new report, using the new SPROC, and copy / paste the objects from the problematic one to the new one. This worked but I’m baffled as to what the issue is. Almost appears as a bug.

    Ben

  • after you rename the SP and refresh the datset, did you rebind the refreshed dataset with the table control on the report.

    Go to the table properties and choose the current dataset.

    and then Preview.

    View Siva Gurusamy's profile on LinkedIn

    "Software changes. This is a rather obvious statement, but it is a fact that must be ever present in the minds of developers and architects. Although we tend to think of software development as chiefly an engineering exercise, the analogy breaks down very quickly. When was the last time someone asked the designers of the Empire State building to add ten new floors at the bottom, put a pool on the top, and have all of this done before Monday morning? " : Doug Purdy, Microsoft Corporation

  • Hi,

    I tried that, including DELETING the dataset and creating a new one. (This forces you to change the dataset in the table properties otherwise you get an error.) Still, the report looks for the original SP. Very strange indeed.

    I have since simply recreated the report by copying / pasting the objects from the old to new one. I’ve learned my lesson: Name the SP appropriately from the beginning!

    Thanks to all that responded.

    Ben

  • Glad you found a workaround.

    Out of sheer interest, you can right click on the report and View Code and look for the old SP name and see where it still is binding to.........

    View Siva Gurusamy's profile on LinkedIn

    "Software changes. This is a rather obvious statement, but it is a fact that must be ever present in the minds of developers and architects. Although we tend to think of software development as chiefly an engineering exercise, the analogy breaks down very quickly. When was the last time someone asked the designers of the Empire State building to add ten new floors at the bottom, put a pool on the top, and have all of this done before Monday morning? " : Doug Purdy, Microsoft Corporation

  • The report doesn’t use any custom code, only a SPROC and dynamic grouping. Out of curiosity I checked your suggestion (Right click>>Properties and click on the Code Tab), and there is no custom code.

    Ben

  • It is not custom code I am referring to, Ben. Just right click the report(rdl) in the solution explorer and select View Code. The report's xml code will open in a new window. There, Ctrl F and look for the procedure name.

    View Siva Gurusamy's profile on LinkedIn

    "Software changes. This is a rather obvious statement, but it is a fact that must be ever present in the minds of developers and architects. Although we tend to think of software development as chiefly an engineering exercise, the analogy breaks down very quickly. When was the last time someone asked the designers of the Empire State building to add ten new floors at the bottom, put a pool on the top, and have all of this done before Monday morning? " : Doug Purdy, Microsoft Corporation

  • Sorry about that, I’m new to SSRS. However, that was one of the first places I looked when a coworker suggested it. There is no reference to it.

  • if you re-name a stored procedure or a dataset, then you need to re-name every single fields populated by this dataset on report layout...

  • I realise this is an old thread but just found it through a search having the same problem myself.

    The above didn't help but I found the solution myself in the end - the preview will still use the old copy of the Stored Procedure, even if it's the same name but you've added extra fields it will.

    To update it after you click on Preview, click on the Refresh page icon to the left of the Printer icon and it will use the most recent copy of the Stored Procedure.

    Hope this helps someone else who finds it in a search. 🙂

Viewing 11 posts - 1 through 10 (of 10 total)

You must be logged in to reply to this topic. Login to reply