You can use data from your TIBCO Spotfire to populate reports created in Jaspersoft Studio. You can navigate your Spotfire Information Links and inspect their data. To load Spotfire data, first create a data adapter; it will return data in simple tabular form. Before you publish the report to JasperReports Server, you must export your data adapter as an XML file so it can be added it to the server's repository.
| This version of Jaspersoft Studio supports TIBCO Spotfire 6.5. 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. |
The Data Adapter wizard appears.
| 2. | Enter a name for the data adapter. |
| 3. | Enter the URL to your Spotfire Web Player. It is in the form: |
http://<web-player-host>/SpotfireWeb
where <web-player-host> is the IP address or name of the Spotfire Web Player that hosts your Information Link.
| 4. | Enter a user name and password to log into Spotfire. |
| 5. | Click Browse next to the Resource ID field to locate the Information Link you want to use. |
The contents of the Spotfire library are displayed.
| 6. | Locate and select the Information Link you want to report against. |
|
Spotfire Library displayed in Jaspersoft Studio |
| 8. | Click Test to test your connection. |
| 9. | If the test fails, check your URL, credentials, and resource ID. |
| 10. | When the test succeeds, click Finish. |
To create your report:
| 1. | Click File > New > JasperReport. |
| 2. | Select template and enter a name for your report. |
The Data Source dialog appears.
| 4. | Select the Spotfire Information Link data adapter you created above. |
You are prompted to select fields for your report.
| 5. | Use the arrow buttons to move fields from the right to the left to include them in your data set. |
| 7. | Optionally select a field to define grouping. |
Jaspersoft Studio displays the report in the Design tab.
| 9. | Edit the report as you usually would; 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 the Spotfire Information Link data adapter you created above, 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. But first, we need to configure the report to use the new XML file.
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. | Click Add to create a property that indicates the data adapter to use. |
| 4. | In the Property Name field, enter net.sf.jasperreports.data.adapter. |
| 5. | 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 |
You are prompted to select a location where your report will be published.
| 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. |
You are prompted to select any resource used by the report, including the data adapter you exported above.
You are prompted to select a data source.
| 6. | Since the data adapter has already been defined for the report, it doesn't need a separate data source. |
| 7. | Select Don't use any Data Source and click Finish. |
Jaspersoft Studio adds your report to the repository.
| 8. | 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. |
| 9. | 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.