Home
Analytics
Check if an oracle table exists before executing a dataset
sanyonokia
Hi All,
I face a problem which has baffled me for a while now. I am running BIRT 2.3.1 and I select data for my report using an oracle 11g database.
The problem is that the report must be deployed to different clients, which may or may not have all the relevant schema's and tables for the datasets in the report.
Is there any way to run the report, error free, with datasets that select from tables that do not exist?
I've looked at javascript for the datasets which can modify the query text during report generation, but I couldn't figure anything out.
Could a stored procedure in oracle teamed with BIRT provide a solution?
Suggestions and ideas are much appreciated!
Ray.
Find more posts tagged with
Comments
sanyonokia
Okay, turns out I managed to solve the problem.
All I did was select table_name from the all_tab_columns table in oracle. I set the result to a global variable and used this as a condition in the beforeOpen method of the datasets to modify the query depending if the table existed or not.