Jump to content

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


seshasai.cse

Recommended Posts

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

Link to comment
Share on other sites

  • Replies 0
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...