To include a report in TIBCO Jaspersoft Server that uses an Oracle stored procedure with a global temporary table, you can follow these steps:
-
Create the global temporary table in Oracle: You will need to create the global temporary table in Oracle that will be used to store the data for the report. The table should have the necessary columns and data types to store the data that will be returned by the stored procedure.
-
Create the stored procedure in Oracle: You will need to create a stored procedure in Oracle that will retrieve the data from the global temporary table and return it to the report. The stored procedure should have the necessary parameters and logic to retrieve the data from the table and return it to the report.
-
Create the report in Jaspersoft Studio: You will need to create a report in Jaspersoft Studio that uses the stored procedure to retrieve the data. To do this, you can follow these steps:
a. Open Jaspersoft Studio and create a new report.
b. Add a new data source to the report by right-clicking on the report and selecting "Data Source".
c. Select "Oracle" as the database type and enter the necessary connection details.
d. Add a new query to the report by right-clicking on the report and selecting "New Query".
e. Enter the name of the stored procedure in the query and add the necessary parameters.
f. Test the query to make sure it returns the expected data.
- Deploy the report to Jaspersoft Server: Once you have created the report and tested the stored procedure, you can deploy the report to Jaspersoft Server. To do this, you can follow these steps:
a. Open Jaspersoft Studio and select the report you want to deploy.
b. Click on the "Run" button to generate a .jasper file for the report.
c. Copy the .jasper file to the "reports" folder in the Jaspersoft Server installation directory.
d. Open the Jaspersoft Server administration console and create a new report unit by clicking on "Reports" and then "Report Units".
e. Enter the necessary details for the report unit, including the name of the report and the location of the .jasper file.
f. Save the report unit and deploy it to the server by clicking on "Deploy" in the administration console.
- Run the report: Once the report has been deployed to Jaspersoft Server, you can run it by accessing the server's web interface and selecting the report from the list of available reports. The report should use the stored procedure to retrieve the data from the global temporary table and display it in the report.
Note: You may need to grant the necessary permissions to the Jaspersoft Server user to access the global temporary table in Oracle. Additionally, you may need to modify the stored procedure to include any necessary logic to filter or sort the data before returning it to the report.