NexJ Logo

External reports

External reports allow Jaspersoft Studio Professional templates to be generated directly from NexJ applications.

NexJ users can use Jaspersoft Studio templates from their Contact workspaces. Subreports can be connected to external reports using NexJ Admin Console.

Creating external reports

An external report is a metadata file that references a JRXML file in the database. NexJ Framework uses external reports to supply information to the Report Manager screen in NexJ Admin Console. They are created using NexJ Studio and must reference the JRXML report template.

To create an external report:

  1. In the NexJ Studio Presentation layer, click the External Reports tab.
  2. Right-click and select New External Report.
  3. In the External Report dialog, enter the report name in the Name field.
  4. Clear the Edit with iReport checkbox.
  5. Click Finish.
  6. In the Caption field, click the Select button  to select a title for the report.
  7. In the Resource field, click the Browse button  to select the JRXML file for the Jaspersoft Studio Professional template.
  8. Click OK.
  9. Select the Master Report (if it is a parent report) and Displayable checkboxes.
  10. In the Method field, select screen or class to specify the parameter supply method you want.
  11. Click the Save button  to save your external report.
  12. Validate the model by clicking the Validate Model button  in the toolbar and fix any errors that may display.

The external report is created. Users can access the report from the Reports button  in NexJ CRM after the report screen has been integrated to the menu.

Updating external reports using NexJ Admin Console

Locally updating your report's JRXML file will not update the report in the NexJ application. Since the report template file used by NexJ CRM is located in the database, not your file system, use NexJ Admin Console to update the report after changes have been made.

To update the JRXML file in the database:

  1. In NexJ Admin Console, navigate to the Report Manager screen.
  2. Select the report you want to update from the report list.
  3. In the Report Preview section, click the Edit button .
    The Edit Report dialog opens.
  4. Right-click the Report Preview zone and select Update From.
    The Add Attachment area displays.
  5. Click the Browse button to locate the report's JRXML file on your machine and add it using the Add File button.
  6. Click OK.
    The Edit Report dialog closes.
  7. Click the Save button  to save your changes.

Your report is updated. When you run the report from NexJ CRM it will include the new changes.

Adding reports to the NexJ Customer Relationship Management Reports menu

For the report to be made available to users in NexJ CRM, the report screen must be added to the collectionWhere attribute of the Reports button .

To make the report accessible from NexJ CRM:

  1. In the NexJ Studio Presentation layer, click the Screens tab.
  2. Right-click the EntityNavigatorPortlet screen and select Customize.
  3. Open the EntityNavigatorPortlet screen.
  4. In the Outline view, expand the nodes Screen > Menus > navigatorToolbar > AllReportsMenu and select itemReport.
  5. In the Properties view, edit the collectionWhere attribute and insert the report screen using this format: (= commandScreen "ScreenCaption").
    For example, the following code is used:

    (and (or (= commandScreen "PhoneBookReportCommand") (= commandScreen
    "EntityReportCommand") (= commandScreen "AllReportCommand") (= commandScreen
    "ReportContact")) (@ displayable))
  6. Click the Save button  to save your changes.

Your report is added to the Reports button  drop-down menu.

Proceed to register the ReportContact screen to the ReportCommandEnum enumeration for it to be added to the commandScreen attribute. This is required for your report to display in NexJ CRM.

Registering screens in ReportCommandEnum

Before the report can be accessed from the Reports button  on the Contacts, Schedules, and Service Requests workspaces in NexJ Customer Relationship Management, the screen must be added to the ReportCommandEnum enumeration. The button's collectionWhere attribute only displays values that have been enumerated in ReportCommandEnum. Adding the report screen to this enumeration essentially registers the report into the button's drop-down menu.
To add the report screen to ReportCommandEnum:

  1. In the NexJ Studio Business Model layer, click the Enumerations tab.
  2. Right-click the ReportCommandEnum enumeration and click Customize.
  3. Open ReportCommandEnum.
  4. In the Values field, select the last value in the list and click the Add button .
  5. Enter the name of your report screen as the Name and Value.

    In this example, ReportContact will be used.

  6. In the Value Captions field, click the Add button .
  7. Select en as the Locale and enter a Caption for the report's title in the menu.
  8. Click the Save button to save your changes.

Your report is now accessible from the Reports button .