Integrating : Focal Point and reporting tools : Creating report templates by using JasperReports
  
Creating report templates by using JasperReports
JasperReports is powerful open source Java reporting tool that can create reports in a variety of formats such as PDF, Microsoft Word, Microsoft Power Point, Microsoft Excel, HTML, and XML. JasperReports includes features like subreports, scriptlets, charts and has support for multiple data sources. Focal Point supports only XML and JSON data sources.
Prerequisites
You must have a good understanding of REST API (XML & JSON Data format), XPath (XML), JSONPath (JSON), and how to create JasperReports by using Jaspersoft Studio.
Before you begin
Download the Open Source Jaspersoft Studio from the following URL: https://community.jaspersoft.com/project/jaspersoft-studio.
In Focal Point, create a Display view that is based on the elements in the module.
Procedure
1 In Focal Point, click Application > Login Page > Login or Balancer URL. Make a note of the server name.
2 In Jaspersoft Studio, create a new JasperReports project.
3 Add Focal Point XML or JSON REST API as a data source for the project by completing the following steps:
a Create a new data adapter and select JSON File or XML document (these are currently the only types of data adapter that are supported in Focal Point).
b Enter the REST URL of the view for the data source.
c Set the JSON data source as default data source in the report template.
d Extract attribute information from the JSON data source by using JSON Path (or from the XML data source by using XPath).
4 Add fields that are configured in the data source to the report template.
5 (Optional) Use JasperReports scriptlets to write more complex expressions in Java. The scriptlet Java class is packaged as a JAR file and deployed in the Apache Tomcat or IBM WebSphere Application Server lib folder.
6 Package the JasperReports template (.jrxml file), JasperReports data source (.xml file), and any resources (such as images) into a .zip file.
7 Generate the report.
What to do next
Add the file as a report template in Focal Point. For more information, see Adding report templates.
Supported attributes in JasperReports
The following table details the Focal Point attributes and the degree to which they can be used in JasperReports.
 
Focal Point attribute
Attribute supported in JasperReports
Check box
Yes
Choice
Yes
Date
Yes
File
No
Integer
Yes
Float
Yes
Heading
Yes
History
Yes
Incoming Links
Yes
List (link)
Yes
List (text)
Yes
Lock
Yes
Matrix
Yes, but only the display type of table
Mirror
Yes
Multichoice
Yes
Text
Yes, but formatting is not retained
Time grid
Yes, but only the display type of table
TrafficLight
Yes, but is displayed in a text format, for example, High, Medium, or Low
URL
Yes
Unique id
Yes
Version
Yes
Notes
LinkInfo business rule is not supported.
Logged changes are not supported.
Links and URLs might be displayed as text or as a link depending on the design of the report. The links are included in the XML (URL attributes). Links to other elements can be presented by text (element name). The links can also be followed and attributes from linked elements included in the report.
Go up to
Focal Point and reporting tools