Basic Concepts:
Query:
is a search to the database to find the information that we need.
Design:
In this section we can see the UI of the report to be created.
Repository Creation
Open JasperSoft Studio.
Expando data adapter on the top left.
Right click on data adapter by default.
Click ‘Create Data Adapter’.
The following window will pop-up and choose 'Database JDBC Connection' then Next.
Properties
Properties
Property of a selected element on the Report.
Palette
This section has all the elements we can include inside a report.
Outline
Bottom left we have this window, we can see the report structure in a tree format.
Element of the Outline
Internationalization
To add a file of internationalization of Integra, we must follow some steps:
Select the report on the outline.
On the properties we select Report.
Inside the dataset property ‘Resource Bundle’ click on examine.
Select the internationalization file integra.resources.language
You have to add the variables to the properties files in all the languages: language_es.properties, language_en.properties y langauge_pt.properties
The notation is: KEY=VALUE in the language.
If has especial characters (accent, ñ, others) use unicode example ó = \u00f3. Distribution would be Distribuci\u00f3n.
Then on the report we put the titles and headers with TextField that point to this values: Example: INITIAL_DATE a Text Field with the Expression $R{FROM}.
To test this you have to have a copy of the properties files on the directory where you have the report. Then you change Respurce bundle for: language. Then you can see the values in the correct language.
To change the language : Menu Window -> Preferences -> Jaspersoft Studio -> Report Execution -> Locale.
If you want to test a particular language you have to import the resource for that language, this is done on the proyect properties on the attribute Resource Bundle.
Example to test español put resource bundle ‘language_es’.
Subreports
The subreport is to decouple login inside the same report.
To add a subreport we have to drag the control subreport from the palette on the right top.
In our case we want the report that already exists so we click in the option select report file, otherwise we create a new one.
We add an existing one.
DataSets
Collection of data.
Has different columns (fields).
When a new record is created on the dataset, this fields are added.
Each dataset is independent, has its own datasource.