since version 3.0.11 The main idea is to have a column which can hold the percentage in relation to another column value, always relative a to group. For example: State Amount Percentage Arizona 600 30% New York 400 20% Florida 1000 50% In the following example, we are adding a percentage colulmn NOTE: Percentage column…
HOW-TO Create a grand total (with no groups)
If there is a need for grand totals and no grouping in the project, DynamicJasper provides a way to get that. Grand totals can be located in the header or the footer of the report DynamicReportBuilder drb = new DynamicReportBuilder(); //ReportBuilder initialization drb.addGlobalHeaderVariable(columnAmount, ColumnsGroupVariableOperation.SUM); drb.addGlobalFooterVariable(columnAmount, ColumnsGroupVariableOperation.SUM); Where the parameters passed are: The column to use…
HOW-TO Create Value Formatter
Value Formatters is the mechanism provided by DJ to decouple the way data is obtained or calculated from the way it is shown. Value Formatters works like jasper reports patterns, but as they are a java class, complex transformation can be done. The good thing about Value Formatters is that they don’t mess with the…
HOW-TO Create Custom Expressions
Custom Expressions is the way we provide to let the developer make complex arranging of the data to be displayed in the report such as a concatenation of 2 or more fields from the data source, a math calculation, etc. Custom Expressions classes must implement the ar.com.fdvs.dj.domain.CustomExpression interface, which has a single method: evaluate(Object object)…