How to distinguish between first run and second run of a report?

Answered How to distinguish between first run and second run of a report?

  • Wednesday, January 09, 2013 10:40 AM
     
     

    How can we differentiate between the runs of a report, i.e whether the report is running for the first time or second time... so that i can make changes to columns based on the run

    Thanks in advance

     

All Replies

  • Wednesday, January 09, 2013 12:33 PM
     
     Answered

    Hi,

    try to create new data set and use stored procedure for querying data.

    In store procedure update table with report names and numer of executions. SEt +1 for current record. Then query the data.

    Or you can try to query table in REportServer database with execution log ([dbo].[ExecutionLogStorage]). look for unique executionIDs for givent reportID. But I'm not shure if this table is truncated or not.

    Maybe there is some simplier way.

    Zdenek


    Please mark as helpful and propose as answer if you find this as correct!!! nosekz.eu

  • Friday, January 11, 2013 9:23 AM
    Moderator
     
     Answered

    Hello,

    Just as Zdenek post above, the report server execution log contains information about the reports that execute on the server. You can use the report execution log to find out information about each processing phase of reports. By default, log entries are kept 60 days. 

    For more information, please see: Report Server Execution Log

    Regards,
    Fanny Liu


    Fanny Liu
    TechNet Community Support