Executing Stored Procedures (DML statements) from SSRS

  • Hi

    I have a report in SSRS 2008 and would like to execute a Stored Procedure (need to populate / update a column in the database which the report will use), THEN allow the user to generate the report. This SP will not return a data set but just do an update in the DB.

    Is this possibile?

    Regards

    Brian

    Regards
    Brian Ellul
    ----------------------------------------------------------------------------------
    Computers are incredibly fast, accurate, and stupid. Human beings are incredibly slow, inaccurate, and brilliant. Together they are powerful beyond imagination.
    - Albert Einstein -

  • This was removed by the editor as SPAM

  • You do not have to use the query builder to build a query. I frequently write the T-SQL in SSMS and then paste it into the text area of the query builder. I see no reason why you could not execute a stored procedure to update data, and then either select data or execute another stored procedure to call your data. Something like

    EXEC sp1 --Does not return anything

    EXEC sp2 --returns data for your report

    or

    EXEC sp1 --Does not return anything

    SELECT fields

    FROM table

    WHERE condition

    Hope this helps

  • Thanks to both!

    Regards
    Brian Ellul
    ----------------------------------------------------------------------------------
    Computers are incredibly fast, accurate, and stupid. Human beings are incredibly slow, inaccurate, and brilliant. Together they are powerful beyond imagination.
    - Albert Einstein -

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

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