If you are unable to create a new account, please email support@bspsoftware.com

 

Running code before and after report submission, is this doable?

Started by Knight, 01 Nov 2012 03:29:29 PM

Previous topic - Next topic

Knight

Hi!

Is it possible to run some (preferably) PL/SQL or Java (if it's possible to use the same database connection the report would use) code each time a report is run?

Our DBA wants to change some database settings on the connection(s) that will be used to produce the report on-the-fly when some reports are run (some reports run a lot better with certain settings).

I know that there is a way to have some commands run when a data source connection is opened but the same connection could/should be used to produce more than one report so that's not flexible enough for our needs...

Is there a way to achieve what he wants?

If there was a way to enforce a certain order of query submission we could probably do something like this:

select function_made_by_our_dba(the_report_name) from dual

in a separate SQL query...

Is there a way to force a query to run before the others (and preferably a way to force a query to run after the others)?

Could the SDK be used for that? Is there a way to trap a start/end report "event" and have code run when they occur?

Thank you!

Nicolas

CognosPaul

Unless set otherwise, queries are run consecutively based on the position of the data containers, top to bottom, left to right.

You can stick a singleton with the result of whatever sp or udf you need in the properties at the top of the page, and it will run before any other objects on the page.