Jump to content
We've recently updated our Privacy Statement, available here ×

Band Resize based on Image Size


amcnamar

Recommended Posts

I've created some dynamic reports using the Java JasperReports API. In particular, I have a subreport with a header and a detail band.

 

I'd like to add an image to the detail band. The image will vary at fill time. Is there any way to set the detail band (or the JRDesignImage) to expand at to accomodate images of varying size?

 

I'd like a behaviour similar to the JRDesignTextField. I can set the height of the JRDesignTextField to 1, then set the setStretchWithOverflow(true). This will allow the JRDesignTextField to stretch vertically if the content of the field is too large for the available area.

 

Is there any way to achieve the same effect with the JRDesignImage? Scaling the image is not an option in my case.

Link to comment
Share on other sites

  • Replies 8
  • Created
  • Last Reply

Top Posters In This Topic

  • 1 month later...

Hi.

 

Has this situation changed recently with new releases (maybe the latest version 3.0.0 release; nothing mentioned in changelog) ?

 

 

We are in desperate need for such functionality. After a long investigation in different reporting engines (JR, Crystal, etc.) we decided on Jasper, but the lack of such functionality will probably force us to change our decision 30% into the project! In my opinion this is a basic functionality and therefore it was taken as given by us. :( :unsure:

 

Please help!

Regards.

 

PS: The 'project' metioned above is not a normal project with a 'reporting' element to it. It is a custom high level Reporting Engine for a specific Business Domain.

Post edited by: jan.du.toit, at: 2008/05/21 13:48

Link to comment
Share on other sites

Hi,

 

This one of the things we are probably going to try in the upcoming release.

But what has to be made clear from the beginning is that images will stretch, but only on the vertical axis.

That means that they can grow, but once they reached the declared width, they cannot grow beyond that.

 

This is because in JR nothing stretched on the horizontal. Not even crosstabs, which once they reach the declared width, they break to the right and continue below.

However, making images stretch on the vertical improves things a lot and might be sufficient for what you need.

You have to understand that making things stretch horizontally too has implications far too great and it is likely to never be supported in JR.

 

Thank you,

Teodor

Link to comment
Share on other sites

  • 2 weeks later...

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