Compare current page number with last page number

waited for a long time .. but no reply from Stackoverflow… Anyway i found my solution.. First in your summary band put this line <printWhenExpression><![CDATA[new Boolean($P{REPORT_PARAMETERS_MAP}.put(“LastPageNumber”,$V{PAGE_NUMBER}).equals(“dummyPrintWhen”))]]></printWhenExpression> Remember this above line must be only in the summary band of the report. After that you can compare this parameter at any point of time in your report … Read more

How to sum all values in a column in Jaspersoft iReport Designer?

It is quite easy to solve your task. You should create and use a new variable for summing values of the “Doctor Payment” column. In your case the variable can be declared like this: <variable name=”total” class=”java.lang.Integer” calculation=”Sum”> <variableExpression><![CDATA[$F{payment}]]></variableExpression> </variable> the Calculation type is Sum; the Reset type is Report; the Variable expression is $F{payment}, … Read more

Multiple queries in a single jasper document

It is possible to use execute multiple queries from a single report by using a subDataset and datasetRun. The behaviour is like having one or more subreports embedded into a single report file. Define a subDataset like this: <subDataset name=”dataset1″> <parameter name=”someParam” class=”java.lang.String”/> <queryString><![CDATA[SELECT column1, column2 FROM table1 WHERE column1=$P!{someParam}]]></queryString> <field name=”column1″ class=”java.lang.String”/> <field name=”column2″ … Read more