Start Stored Procedure from Reporting Services Report which updates a database table

  • I have a report which retrieves data directly from a table. This table is filled by a stored procedure. I want to start this stored procedure from my report by clicking on a button or hyperlink, so it can update the table. Is this possible and how can I do this.

    I know I can also use the stored procedure in the report as a dataset to immediately deliver the data to the report, but that is not what I want. The report is going to query a lot of database servers at once, so I want to decide when data needs to be updated and when this is not necessary.

    I'm using BIDS 2005

    Marco

  • You can have a parameter in a report, which gives an option to exec ur SP.

    Parameter:- RefreshTable? : Yes/No (1/0)

    pass this value to SP. If yes(1) then run the other SQL inside the SP else exit the sp.

    So with this u can run SP only if u required

  • lbhat

    Thanks for pointing me in the right direction.

    I have made a SP whit a @refresh parameter. When this parameter is 1 then it updates the table and after that is outputs the table. If the parameter is 0 then it only outputs the table.

    In my report I linked the stored procedure to the dataset and I have made a button, which navigates to the same report with the Refresh parameter set to 1.

    This great and really simple.

    Thanks a lot!

    Marco

Viewing 3 posts - 1 through 2 (of 2 total)

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