How to change the sub report position in the main report through scriptlet

Hi Team,

We have MasterReport.jrxml, and SubReport.Jrxml and I want to change the Sub report x and y corordinates dynamically through MasterReport Scriptlet class. Is it possible, if so could you provide the sample.

public void beforeReportInit() throws JRScriptletException {
// super.beforeReportInit(); 
JasperReport jr = (JasperReport) this.parametersMap.get("JASPER_REPORT").getValue();
JRBand jb = jr.getPageFooter();
JRElement je = (JRElement) jb.getElementByKey("frmFoo");
je.setX(30);
 
}

These coordinates are assigned properly but not reflecting in the report. please suggest your expirience .

Thanks

Seshaa

seshasai.cse's picture
Joined: Apr 25 2017 - 6:16am
Last seen: 5 years 1 week ago

0 Answers:

No answers yet
Feedback