Home
Analytics
Delete Data From DB When Closing Report
mmah
As a security measure, I want to delete some records from the database based on the batch number of the records. This will happen when I close the preview window.
I have a SQL query to delete those records - a simple one based on an output parameter like 'DELETE PT_SOA WHERE SOA_BATCHNO = :P_BATCHNO (output P)
But then the problem is I have no idea of how to implement that deleting record thing upon closing. Any idea of where to put this event and script sample of how to do this activity?
Thanks in advance.
Find more posts tagged with
Comments
bhanley
This would not be something BIRT supports, or can even control. A BIRT Report is rendered in a browser (or similar client-side application). No server-side component would be aware of the act of closing the window.
You could implement a piece of JavaScript or a button to invoke the delete routine. At that point you would need to implement the code to handle the processing, BIRT would not be a part of the transaction.
mmah
Brian,
Since it's not possible to do so, can the deletion of data be done in the afterClose() method of the specific dataset? If I execute that deletion, will it alter the report look (i.e returning nothing) or it happens after the preview report is shown?
If it's possible, (well, given that I don't really know much of scripting here), is there any sample script that will incorporate the SQL into it?