User Guide
  • Introduction
  • Overview
    • About 4WS.Platform
      • Architecture
      • Enterprise Edition
      • Tech specs and requirements
      • Warp SDK
    • Creating a web application
  • Core features
    • Tables
    • SqlTool
    • Definition of Data models and Relations
      • Relations
      • Reverse Engineering
      • Custom Fields
    • Defining business components
      • What are business components
      • Business components to fill-in panels
      • Creating business components
        • By a datastore entity
        • By a MongoDB collection
      • Defining Custom Java Business component
    • Defining the UI
      • App Designer
        • App Designer Menu
        • Definition of additional data sources
        • Panel containers and layouts
          • Tab panel
          • Alternative panel
          • Accordion panel
          • Vertical orientation panel
          • Horizontal orientation panel
          • Columns panel
          • Table panel
          • Generic panel
          • Responsive panel
        • Window content
          • Grid Panel
          • Form Panel
          • Filter Panel
          • Tree Panel
          • Google Map Panel
          • Preview Panel (old Image panel)
          • Tree + Grid Panel
          • Image Gallery
        • Windows list
        • Panel definition
          • Columns properties
          • Controls properties
          • Filter properties
          • Supported components
        • Variables
        • Code selectors
          • When not to use a dynamic combo-box
        • Smart Filter and Advanced Filter
        • Multi Value Combobox Filter
        • Multi Value Tree Filter
        • Buttons
        • Translations
          • Translations about GUI components and internationalization settings
          • Data coming from database
          • Custom code and translations
        • Application Menu
        • Bulk import binded to a grid
        • Range Date Filter
      • Web Interpreter
        • Grid components
        • Detail forms
        • Other components
        • Other features
          • Chat
        • Global variables
          • Client-side global variables
          • Server global variables
        • Forgot Password
    • Working with users and roles
      • Rule for roles
      • Permissions Administrator
    • Wizard
      • How to add a checkbox grid to select one or more rows
      • How to load a second grid when clicking on a row from the first grid
      • How to load a form when clicking on a row of the grid
      • How to open a window when double clicking on a row of the grid
      • How to open a window with right click on the popup menu
      • How to open a window when pressing a button on the grid toolbar
      • How to load a grid after loading a form
      • How to open a window when pressing a button on the form toolbar
      • How to load a grid when clicking on a tree node
      • How to load a form when clicking on a tree node
    • Defining events
      • Panel events
      • Column events
      • Control events
      • Filter events
      • Timer events
      • Start-End event
    • Server-side Javascript & Web Service
      • Server-side Javascript
      • Grid component filled by a server-side JS
      • Detail component filled by a server-side JS
      • How to define a server-side JavaScript action
      • Web service
  • Setting up the environment
    • How to install
    • Application parameters
    • Global parameters
  • Modules
    • Reports & Charts
      • Jasper Report + iReport
      • Online report
      • Docx templating
      • Charts
      • Pivot Grid
      • Multidimensional pivot grid
      • Data Export from SQL query
    • SSO
      • Identity management in Platform
        • Identity management on the internal Platform database
        • Identity management based on Google SSO
      • LDAP
        • LDAP support
        • Identity management based on LDAP and database
        • Identity management based on an embedded LDAP server used by Alfresco and or Activiti
        • Identity management based on a remote LDAP server to connect to Platform on the cloud
        • Connecting an LDAP server to Activiti BPM
        • Connecting an LDAP server to Alfresco ECM
      • Google SSO
        • Google SSO
        • Google OAuth2
        • Identity management based on Google SSO
      • Custom SSO
      • Firebase
    • Mobile
      • Mobile introduction
      • Offline vs Online
        • Server side features
        • Server side functionalities
        • Server side Platform features
        • Mobile app features
      • Mobile side specifics
        • Customizations
          • Custom theme editor
        • App Menu
        • Window content
          • Detail scrollable form
          • Scrollable paginated grid
          • Constraint layout
          • Constraint panel
          • Collection grid view
          • Preview panel (mobile)
        • Form Controls
      • Reference guide
      • Cleaning up data
      • How to
      • App deployment
        • App deployment for the iOS platform
        • App deployment for the Android platform
      • Style properties
      • Appendix : Synchronization flow
      • Translations
    • GSuite
      • Introduction
      • Client-side integration
      • GMail
      • Calendar
      • Drive
      • Contacts
    • Google Cloud Platform
      • Datastore
        • Google Datastore Introduction
        • How to create Datastore entities
      • Google Cloud Storage
    • Scheduler
      • Scheduler Introduction
      • Process settings
        • How to define a sequence of consecutive processes
        • How to define a Custom Java Business component
        • How to define a Grid Data Import
        • How to define a server-side Javascript action
      • Email notifications
      • Process executions
      • Manually start a scheduled process
      • Process input parameters
    • Queue Manager
    • Log & Analysis
      • Application Log
      • Log statistics
      • App analyzer
      • Table log
      • Threads
      • Sessions and heap memory
      • Heap memory analysis
      • Access Log
      • Datastore statistics
      • Total monthly costs with Google Datastore
      • Service Monitoring
        • Introduction
        • Defining a service to monitor
        • Notifications setup
        • Events automatically managed by Platform
        • Remote Platform servers
        • Knowledge base
        • Adding log programatically
        • Searching for logged data
        • Use cases
    • File Management
    • Export and Import of Metadata
      • Application Metadata Management
    • Trigger writing operations
    • Audit
    • BPM
      • BPMN Introduction
      • BPMN main parts
      • Activiti Setup
      • Platform integration
        • Processes
        • Models
        • Process instances
        • To-do list
        • Process history
      • Process Web Modeler
        • Model Creation
          • Start-End Event
          • Gateways
        • Supported objects
        • Start tasks and user tasks
        • Form properties
          • Important notes
          • Property types
        • Service tasks
          • Web service
          • SQL Query
          • SQL statement
        • Mail task
        • Script task
          • Example : how to get a value previously read from a SQL query
          • Example : how to get the current process instance id
        • Timer events
        • Subprocess and Call Activiti
      • Utility methods available in Platform
        • How to start a process from a JavaScript action
        • How to complete a user task from a JavaScript action
      • An example
        • Processes
        • Instances
        • Activities
        • History
    • Embedded CMS
    • ECM
      • Alfresco
        • Alfresco Introduction
        • Integration between 4WS.Platform and Alfresco
          • Integration at GUI level
          • Integration at model level
          • Integration at authentication and authorizations level
          • Additional features
        • How to use 4WS.Platform and Alfresco together
          • Set the same Identity Management system
          • Define document types and aspects in Alfresco
          • Import the document types and aspects definitions in 4WS.Platform
          • Define document types and aspects in 4WS.Platform
          • Reverse engineering of document types or aspects
          • Definition of business components to fill-in panels
          • Definition of the GUI
          • Additional server-side services
        • Requirements
        • Current limits in 4WS.Platform - Alfresco integration
      • Archiflow
        • Setup
        • Archiflow artifacts
        • How to
    • Lotus Notes Migration Tool
    • NoSQL databases
      • MongoDB
        • MongoDB Introduction
        • Setting up the environment
        • How to create collections
        • How to create business components
        • How to create windows filled with data coming from MongoDB collections
        • Design rules
      • Google Datastore
        • Google Datastore Introduction
        • Setting up the environment
        • How to create entities
        • How to create business components
        • How to create windows filled with data coming from Datastore entities
        • Design rules
    • TensorFlow
    • Web Page Development
      • Pure Web Page Development
      • Google Material Design development
      • Appendix A - a complete example without any lib
      • Appendix B - a complete example with Google MD
    • Jira Integration
    • Platform for GAE
    • SQL errors management
    • Multidimensional pivot grid
    • Quality
      • Automated Web Service Testing
      • Automated unit testing
      • Source code static analysis using ESlint
      • Source code static analysis using SonarQube
  • Troubleshootings
  • Best practises
    • Database design
    • Database maintenance
    • Creating a Web app : common use cases
    • Creating a mobile app : common use cases
Powered by GitBook
On this page

Was this helpful?

  1. Modules
  2. Reports & Charts

Jasper Report + iReport

PreviousReports & ChartsNextOnline report

Last updated 4 years ago

Was this helpful?

4WS.Platform includes Jasper Report version 4.5.1. You can develop report templates using for instance iReport free designer. Together with .js and .class custom files, you can also include report templates. Once included in the custom application subfolder, these will become available to the Web Interpreter. A report can be invoked: as a menu item from the application menu as a button in a panel; in this case, you can also pass parameters to the report. Using "Application Menu" menu item you can define folders and menu items, including reports. In any case, a wizard is prompted in order to define all information required by the report. Reports have to be included in the subfolder of the specific application (e.g. /tomcatxxx/webapps/platform/yourapplicationsubfolder/report1.jasper). Once selected a report template in the wizard, the list of parameters is reloaded after analyzing the report template and all required parameters are reported. In this way it is possibile to define how each parameter should be managed.

Required data to specify when defining a report execution are:

  • text to show in the menu item or text button, used to execute the report

  • report name , fetched from the list of .jasper files stored within the subfolder in the Platform web context

  • datastore to use when invoking the report, that is to way, the database connection to pass to the report in order to allow the report to retrieve data from a database on its own

  • report format – PDF or XLS or DOCX (since 6.0.2)

  • list component – optional field; it can be used if the report must be filled in with a list of records expressed in JSON format and coming from a business component; the requirement is that the business component must provide a list of records, not a detail business component.

Additional requirements to meet on the iReport side are:

  • the query to set must remain empty BUT the query language MUST be set to JSON

  • declared fields must respect the naming of the JSON response, i.e. fields must be attributes (e.g. itemCode, description, etc.); moreover, the "description" property of each field must be filled to, with the same attribute name , otherwise the resulting report will not contain any result (null values instead of the real values provided by the JSON response).

For each parameter it is possible to include it in the filter panel or not. Each parameter can be managed in 4 alternative ways:

  • without any preset value, typically for parameters to show in the filter panel and to fill in by the user on the fly

  • with a constant value, typically for parameters to preset and not to show in the filter panel

  • with a variable (expressed as :XXX), dynamically set when opening the report, typically for parameters to preset and not to show in the filter panel

  • with a code selector, to show in the filter panel and to fill in by the user by choosing a value from the list proposed in the codes list (lookup, combobox, etc.)

In case at least one parameter has been configured to be viewed, a filter panel is proposed each time the user press on the report: in this ways the user can set the values in the filter controls and then generate the report. In case no parameters have been defined to be showed, the report is directly generated when pressing on the report generation (i.e. menu item or report button in grid/form).

Filling a Jasper Report template with a server-side js business component You can use iReport to create a report template which is not connected to a SQL query, but it is fill with a list of records expressed as a JSON string, passed by Platform to the report, when executing it. The steps to follow are:

  • create a report template with iReport, without specifying a SQL query

  • choose “Use the report JSON Expression when filling the report” to be able to specify your query within the individual report

  • in iReport’s “language query”, choose JSON in the drop-down

  • in iReport’s “text query”, set the attribute in JSON containing the list of data (e.g. valueObjectList)

  • define manually every field needed in the report (see the section “Fields”), by pressing the “Add” button to add the field; here it is essential to set also the “description” field and not only the field name: the “description” field must be set with the attribute name reported in the JSON list of data

  • it is not possible to test the report directly from iReport: you have to publish it into Platform

  • during the publishing process of the report in platform, you have to fill also the “List component” optional lookup: here you have to choose the right business component, which has to provide the same attributes you defined in the report template