You can populate reports created in Jaspersoft Studio with data from TIBCO Spotfire. You can navigate your Spotfire library, select Information Links and Spotfire Binary Data Files (SBDFs), and inspect their data. To load Spotfire data, create a data adapter to connect to the data. The data adapter will return data in tabular form. Before you publish the report to JasperReports Server, export your data adapter as an XML file so you can add it to the server's repository.
| This version of Jaspersoft Studio supports TIBCO Spotfire 6.5 and above. Earlier versions may also work but have not been tested extensively. |
To create a data adapter for a Spotfire Information Link:
| 1. | In the Repository Explorer, right-click Data Adapters and select Create Data Adapter to display the Data Adapter wizard. |
| 2. | Enter a name for the data adapter. |
| 3. | Enter the URL to your Spotfire Web Player in this form: |
http://<web-player-host>/SpotfireWeb
where <web-player-host> is the IP address or name of the computer hosting the Spotfire Web Player where you access your Information Link.
| 4. | Enter your Spotfire user name and password. |
| 5. | Click Browse next to the Resource ID field to locate and select your Information Link in the Spotfire library. |
|
Spotfire Library displayed in Jaspersoft Studio |
You can also create reports against SBDFs; to do so, select one from your Spotfire library.
| 7. | Click Test to test your connection. |
| 8. | If the test fails, check your URL, credentials, and resource ID. |
| 9. | When the test succeeds, click Finish. |
| It isn't uncommon for an Information Link to return millions of rows of data, which may take a some time for Jaspersoft Studio to process when data is loaded, such as when previewing the report; the same may hold true in JasperReports Server. |
To create your report:
| 1. | Click File > New > JasperReport. |
| 2. | Select template and enter a name for your report. |
| 3. | Click Next. The Data Source dialog appears. |
| 4. | Select the Spotfire Information Link data adapter you created above. |
| 5. | Select the fields to include in your data set. |
| 7. | Optionally select a field to define grouping. |
| 8. | Click Finish. Jaspersoft Studio displays the report in the Design tab. |
| 9. | Edit the report as needed. For example, add fields and components and configure your query and dataset. |
| 10. | Click Preview to ensure that the report is correctly configured. |
| 11. | When your report is ready, click File > Save. |
To export your data adapter as an XML file:
| 1. | In the Repository Explorer, right-click your Spotfire Information Link data adapter and select Export to File. |
| 2. | Select the folder in your Jaspersoft Studio workspace that contains your report, enter a name for the data adapter, and click OK. |
The data adapter and report don't have to be in the same place, but it can make it easier to publish your report.
To configure the report to use the exported data adapter:
| 1. | In the Outline pane, click the root node of your report to display the report properties. |
| 3. | Expand Misc and click the ellipsis to the right of Properties to open the Properties window. |
| 4. | Click Add to create a property that indicates the data adapter to use. |
| 5. | In the Property Name field, enter net.sf.jasperreports.data.adapter. |
| 6. | In the Value field, enter the name of the data adapter you exported (this is an XML file). |
You're ready to publish your report.
To publish your report:
| 1. | Click |
| 2. | Select a server connection and navigate its repository to the desired location. |
| 3. | Optionally enter a new label, name (ID), and description of the report unit. |
| 4. | Click Next. You're prompted to select a resource used by the report, including the data adapter you exported above. |
| 5. | Click Next. You're prompted to select a data source. |
| 6. | Select Don't use any Data Source. Since the data adapter has already been defined, the report doesn't need a separate data source. |
| 7. | click Finish. Jaspersoft Studio adds your report to the repository. |
While it's uploaded, Jaspersoft Studio modifies your JRXML so that it will run properly on the server. In particular, it changes how the data adapter is specified. On the server, the data adapter is uploaded to the folder you selected when you published the report.
To test your report, open the server's web UI, locate your report, and click it to run it.
Recommended Comments
There are no comments to display.