Trying to Create an audit for reports viewed RRS feed

  • Question

  • I have a custome c# web app.
    I have a report menu populated from a tree view . On selection of the records It opens a new connection to report server and retrieves the report.
    All security is set properly. The issue i'm incounterring is that i'm trying to audit who has accessed what report. I have all the backend created just not sure which event if there is any i can attach my audit to.

    += new CancelEventHandler(rptViewer_ReportRefresh);
    // only fires this event when the refresh button is clicked.
    rptViewer.DataBinding +=
    new EventHandler(rptViewer_DataBinding);
    // does not fire this event at all on reportViewer.ProcessingMode = Microsoft.Reporting.WebForms.ProcessingMode.Remote

    rptViewer.PreRender += new EventHandler(rptViewer_PreRender);
    // fires this even everytime the report is postback even if the postback is from another part of the page.

    I would love to hook it up with rptViewer.ReportRefresh if this was fired also by the "View Report" Button it would solve my problem.

    anyone run into this issue ? or knows a way to solve it ?

    Tuesday, September 30, 2008 7:04 PM

All replies

  • Hello Chris,

    i hope you find your Informations here:

    SELECT TOP (100) PERCENT e.UserName, e.TimeStart, c.Name AS ReportName,e.Parameters

    FROM ReportServer.dbo.ExecutionLog AS e INNER JOIN

    ReportServer.dbo.Catalog AS c ON e.ReportID = c.ItemID

    WHERE (e.Format = 'HTML4.0')


    Germany, NRW
    Wednesday, October 1, 2008 7:32 AM
  • This actually will not help since i'm getting the report by remote. And not using windows authentication but am using 

    ImpersonationUser credentials so I only need to grant access to the reports on the server for 1 user. The application is in charge of authenticating the users that come in and getting them to select from their available report lists. After which it impersonates the network user credentials to retrieve the report.
    No other way that I can do that for clients that are external.

    Wednesday, October 1, 2008 2:57 PM
  • Found a very bad solution.
    I'm now tracking every action that happens on the webpage and can cause a postback.
    if it's not one of those actions that caused the post back then it must have been the view report therefore audit it on rendering of the reportviewer.
    Also audit on the refresh event which does not cause a postback.

    Wednesday, October 1, 2008 2:59 PM