- 22 May 2023
- 4 Minutes To Read
- Updated On 22 May 2023
- 4 Minutes To Read
Learning about Jasper
You can use the following tutorials and user guides to learn about Jasper:
- Introduction to Jaspersoft Studio
- Designing a report
- Report Structure
- Getting Started & Tutorials
- Jaspersoft Studio User Documentation
Jaspersoft offers a set of examples and usage details about reports packed into a project. These details cover the main available features case by case. Download the project and explore it to see how different widgets can be used and how your reports can look like. Follow the tutorial to get examples compiled and filled with data.
Using Jasper with Mambu
Furthermore, you can learn about using Jasper with Mambu in the following sections.
Creating Jasper reports requires working with the Mambu database. We maintain a data dictionary with the tables and the relations between them. Explore each table: from its purpose, to its columns, types, and required data. A few charts also offer an overview of the most common entities. We recommend exploring the dictionary before you start working with Jasper reports.
Parameters are used as input values for reports. They can be used to filter the results of Jasper to pass some data to be included. Mambu supports the parameter types:
To use them, you have to declare the Jasper parameter of the equivalent Java type (like
java.util.Date for the Date type). The result will be seen when opening the report's overview, where the input will be rendered in the according widget, such as the Date widget. The type is used in the input validation process, each one allowing only the intended values.
These parameters can also have a description, displayed in Mambu as a label, to be clear in purpose.
Mambu offers support for a few predefined parameters. These parameters, when used in specific contexts, get automatically completed at runtime.
For example, let's assume a
BRANCH_ID parameter is built into the logic of a report and the report associated with the
Branch category so that it is available at the branch level. When running the report from the context of a branch, from its overview, Mambu will populate the ID without further input required from the user. If the same report is run directly from the Administration panel, the ID will have to be added by the user, as there is no branch context there.
The following preview shows a report containing both predefined and regular parameters or go further and try the Transactions per Account report example on your own.
Parameters are case sensitive and in most cases should be written in ALL_CAPS with underscore used to separate words instead of any spaces, eg.
INTEREST_APPLIED and not
The names of the parameters should also be identical when declared in a Jasper report. For example the
BRANCH_ID parameter should have the
Check out the supported list of predefined parameters by report type:
CENTRE_KEY / GROUP_ID, or
BRANCH_KEY / CENTRE_ID,
CENTRE_KEY / USER_ID, or
- Loan Accounts/Deposit Accounts
- Loan Groups
- Loan Transactions/Deposit Transactions
Allowed MySQL variables and functions
Starting with Mambu v9.63, in order to add new mySQL variables and ensure these are allowed in running Jasper Reports, make sure you use the
mbu_ prefix. For example, if you want to add
@myvariable, you need to name it
@mbu_myvariable. All previously used variables have been verified and added to our 'Allowed variables' list and existing variables will continue to be supported.
Most MySQL functions that are secure will be executable, for more information, see MySQL Functions and Operators on the MySQL website.
Allowed Java and Groovy classes
Starting with Mambu v9.63, in order to ensure continuity for your Jasper Reports, make sure the Java and Groovy classes you use are included in the Jasper Reports' built-in functions or check that they are present in our 'Allowed List'.
We have also put together a list of 'Allowed Java/Groovy classes'. This list can be found in Jasper Reports built-in functions.
java.lang.StringBuffer java.lang.Boolean java.lang.Double java.lang.Byte java.lang.Float java.lang.Integer java.lang.Long java.lang.Math java.lang.Number java.lang.Short java.math.* java.time.* java.text.* com.mambu.number2words.api.factories.NumberTranscriberFactory.* java.util.Date java.util.Locale java.util.Calendar java.util.UUID
Jasper report configuration
The results are returned a pages of 10 000 items per page. To avoid the results being unexpectedly truncated, make sure to build a pagination algorithm when working with larger data sets.
Mambu currently supports the use of the following fonts:
- Deja Vu Serif
- Deja Vu Sans
- Deja Vu Sans Mono
- Myanmar3 (regular type only)
- Sans Serif (default font, not available for export)
These fonts display as expected when a Jasper report is exported to PDF or other file formats.
If you want to use a function, but you get a 'Not Allowed' error or you have any other issue in the Jasper Reports, please contact us through Mambu Support.