Jump to content

Dynamically positioning of image using scriptlet fails


JimboJones2018

Recommended Posts

Hi,

I made a report with Jaspersoft Studio 6.2.2. The image on the first page should be positioned dynamically. This should be done with a scriptlet like this ...
 

    @Override    public void beforeReportInit() throws JRScriptletException {        JasperReport jr = (JasperReport) this.parametersMap.get("JASPER_REPORT").getValue();        JRBand titleBand = jr.getTitle();        JRElement je = titleBand.getElementByKey("img_logo");        je.setX(100);        // setting the x-position     }[/code]

After generating the report it seems that it doesn´t work, image-object is still on the origin position. Retrieving the x-position with get()-method shows the expected value of 100. It is via scriptlet not possible to change the position dynamically ??

Any ideas ?

Greetings, 
Jimbo

Link to comment
Share on other sites

  • Replies 1
  • Created
  • Last Reply

Top Posters In This Topic

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...