Filed under: Uncategorised
Comments: None
The upgrade to JasperReports and iReports has been pushed to the code repository. The instructions for installation of the product have changed and are provided below:
Thanks again to Joel Harris for providing these instructions! These instructions will be present in the opal documentation.
Install iReport
If you haven’t already, install iReport on your machine.
It can be downloaded from the JasperForge website at http://community.jaspersoft.com/project/ireport-designer .
Make sure you install version 5.0.1.
Installing the NexJ iReport plugins
You must install two iReport plugins to enable communication between iReport and your NexJ model.
To install the necessary plugins:
- In iReport, select Tools > Plugins.
The Plugins dialog opens - Open the Downloaded tab and click Add Plugins.
The Add Plugins dialog opens. - Navigate to your NexJ Studio plugins directory (e.g. c:/nexj_studio/opal/plugins) and open the following folder:
- CODE: SELECT ALL
com.nexjsystems.nexjstudio_8.1.XXX.000
- Select the following plugins and click Open:
- nexj-ireport.nbm
- nexjlib.nbm
The Add Plugins dialog closes.
- Select ireportplugin and nexjlib from the Install list and click Install.
The plugins are installed and now appear in the Installed tab. - Click Close.
The Plugins dialog closes.
You have added the required NexJ plugins to iReport.
Configuring NexJ Studio to launch iReport
For NexJ Studio to launch and communicate with iReport its preferences need to be modified.
To configure NexJ Studio to interact with iReport:
- In NexJ Studio, select Window > Preferences.
The Preferences dialog opens. - In the navigation sidebar, select NexJ Studio.
- Set the iReports Executable field to the location of ireport.exe in your iReport-5.0.1 directory. By default, this will be:
- CODE: SELECT ALL
%PROGRAM_FILES%/iReport-5.0.1/bin/ireport.exe
- Set the Installed Netbeans Module Jar field to the nexjlib.jar file in your users directory. By default, this will be:
- CODE: SELECT ALL
C:/Users/Name/.ireport/5.0.1/modules/nexjlib.jar
- Click Ok.
The Preferences dialog closes.
iReport can now be launched from NexJ Studio.
Proceed to configure the query executer and connections in iReport.
Adding the query executer
When you create a new report in iReport, you will use the NexJOO query language to construct the query.
To add the query executer:
- In iReport, select Tools > Options
The Options dialog opens. - Open the Query Executers tab and click Add.
The Add/Modify Query Executer dialog opens. - Use the following settings to add the NexJOO query language:
- Language: NexJOO
- Factory Class: nexj.ireport.IReportQueryExecutorFactory
- Fields Provider Class: nexj.ireport.FieldsProvider
- Click Ok.
The Add/Modify Query Executer dialog closes.
The NexJOO query language has been added to iReport.
Adding the connections and datasources
You will need to add a primary data source in iReport from which data will be queried and added to the report.
To add the connections and datasources:
- In iReport, click the Report Datasources button on the toolbar.
The Connections/Datasources dialog opens. - Click New.
- Select Query Executor mode from the list of datasource types and click Next.
- In the Name field, enter
- CODE: SELECT ALL
NexJ Query Executer
.
- Click Save.
The Connections/Datasource dialog closes.
The datasource has been added to iReport and is now the default datasource.