Last run date

  • How do i get last run date on the footer of the page. Please help me. Kind regards.

  • Last run date is by definition the date the report runs, AKA GETDATE().

    -- Gianluca Sartori

  • Gianluca Sartori (12/21/2010)


    Last run date is by definition the date the report runs, AKA GETDATE().

    Last run date is when the report was run lastly. Suppose if yesterday i opened the report and again if i open the report today i want to see yesterday's date.

  • varunkum (12/21/2010)


    Gianluca Sartori (12/21/2010)


    Last run date is by definition the date the report runs, AKA GETDATE().

    Last run date is when the report was run lastly. Suppose if yesterday i opened the report and again if i open the report today i want to see yesterday's date.

    Two choices come to mind -

    1.have the report store the run date in the database whenever it is run and select that date out when it is next run.

    2.Have the report query the SSRS database for it's own history

    MM



    select geometry::STGeomFromWKB(0x0106000000020000000103000000010000000B0000001000000000000840000000000000003DD8CCCCCCCCCC0840000000000000003DD8CCCCCCCCCC08408014AE47E17AFC3F040000000000104000CDCCCCCCCCEC3F9C999999999913408014AE47E17AFC3F9C99999999991340000000000000003D0000000000001440000000000000003D000000000000144000000000000000400400000000001040000000000000F03F100000000000084000000000000000401000000000000840000000000000003D0103000000010000000B000000000000000000143D000000000000003D009E99999999B93F000000000000003D009E99999999B93F8014AE47E17AFC3F400000000000F03F00CDCCCCCCCCEC3FA06666666666FE3F8014AE47E17AFC3FA06666666666FE3F000000000000003D1800000000000040000000000000003D18000000000000400000000000000040400000000000F03F000000000000F03F000000000000143D0000000000000040000000000000143D000000000000003D, 0);

  • Forum Etiquette: How to post Reporting Services problems
  • [/url]
  • Forum Etiquette: How to post data/code on a forum to get the best help - by Jeff Moden
  • [/url]
  • How to Post Performance Problems - by Gail Shaw
  • [/url]

  • Put a textbox in the footer of the report with this as the expression:

    =Globals!ExecutionTime

    That will put a time stamp on when the report was run

    If you want to know when the report was run last, before the time you are running it now you will probably have to write that data somewhere into your db and then call it back to the report in your dataset.

  • You could extract the data in your report from a stored procedure, that could update some table with a "last run date" field.

    Even better, without changing the report data source, you could add a new one that just calls the stored procedure to retrieve and store "last run date".

    -- Gianluca Sartori

  • Thanks for your reply. I have a new column for last report run date. Could you please send me the code to store the getdate(). I am actually getting confused with sql and .net. Thank you

    Well without really knowing your table design, but assuming it has at least report name and last run date. The first thing I would do is manually populate a row with the report name in question and a bogus last run date. Then in your report query add the last run date. After your query has run use something like:

    UPDATE dbo.tableNameHere

    SET LastRunDate = GetDate()

    WHERE ReportName = ReportsNameHere

  • Viewing 7 posts - 1 through 6 (of 6 total)

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