on 09-25-2008 3:50 PM
Looking for a way we can audit Crystal Report History
i.e.
1) Log who Ran the Report
2) Time it Started
3) Time it Completed
In an Oracle Table every time a user runs a Crystal Report. Was thinking we may be able to do this by calling a Stored Procedure inside the Crystal Report? but we have been seeing issues with this. Has anyone else been able to do something like this sucessfully ? or anybody have any ideas on how to go about doing something like this?
Thanks!
The application does have Crystal Plugin it calls but its packaged software and would cost a lot of them to modify the application side which is where it should run really. So we were trying to do it via a SP inside of the Crystal Report somehow/someway.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Ah well... Then fudging it with subreports in the report header and footer would be your best bet.
Create a couple of SP's:
sp_start
parameters: report_name, user, start_time etc...
output: row_id
This should write a new row to a logging table with the input values. You'll have to store the output into a (global) variable so that it can be passed via the main report to the second subreport which calls...
sp_end
parameters: row_id, end_time
This should update the row_id that's passed in with the end_time value
HOWEVER (!!), I believe that sp_end will only get called (and therefore the row updated) when you either view the last page of the report, or print/export it. If you just look at the first page, it'll never have to try and render the final page, and therefore not call the subreport.
Also, refreshing the report / exporting it to multiple formats will cause multiple lines to be written to the logging table.
So, not nice. Unless someone else has a better idea?
Hmm, depends. Are the reports called from an application (a report viewer) that you control/can modify, or do they have a full copy of CR that they can fire up and run?
I've tried the SP way (as least, on SQL Server) and it was a bit mmmnnnah, to be honest - duplicate entries when refreshing/exporting a report were top of the pile. So added some code to the report viewer application to log the data, which is much better.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
24 | |
11 | |
9 | |
7 | |
6 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.