Image is not displayed in jasper server, if size of the image is more?

In my jasper server image is nto displyed when size is more.May i know the Maximum size of the Image and is there any possibilty to increase the size of the image?
netti royala's picture
Joined: Oct 28 2013 - 11:43pm
Last seen: 8 years 2 months ago

3 Answers:

Java_Jasper's picture
Joined: Jan 17 2012 - 10:13am
Last seen: 7 years 3 months ago

Thank you sir .but got this error when i execute ireport
-- "Error exporting print... java.lang.RuntimeException: New BMP version not implemented yet.
net.sf.jasperreports.engine.JRException: java.lang.RuntimeException",how to solve this sir

netti royala - 9 years 4 months ago

Here is a code snipit as well to try:

BufferedImage img = ImageIO.read(new File(wo_image_path));

height = img.getHeight();

width = img.getWidth();

jasperSubDesign = JasperManager.loadXmlDesign(context.getRealPath("/WEB-INF/reports/decoration_sheet_header.jrxml"));

JRDesignImage image = (JRDesignImage)jasperSubDesign.getPageHeader().getElementByKey("wo_image"); image.setX(3); image.setY(69); image.setHeight(new Long(height - Math.round(height*.35)).intValue());

image.setWidth(new Long(width - Math.round(width*.35)).intValue());

JasperCompileManager.compileReportToFile(jasperSubDesign, context.getRealPath("/WEB-INF/reports/decoration_sheet_header.jasper"));

Java_Jasper's picture
Joined: Jan 17 2012 - 10:13am
Last seen: 7 years 3 months ago

I am using iReport to Design Reports and those reports are deployed in to Jasper Server.In iReport itself got This Error "Error exporting print... java.lang.RuntimeException: New BMP version not implemented yet.
net.sf.jasperreports.engine.JRException: java.lang.RuntimeException: New BMP version not implemented yet."How can resolve this one .

netti royala - 9 years 4 months ago

Hello,

With Java there is no support to work with BMP files by default. You need a special library to load images from files with formats other then JPG and GIF. You could use advanced imaging APIs provided by Oracle, if so you would load the image yourself by calling the API and return to the report an java.awt.Image object for display.

Short answer use a JPG or GIF image, they work well in Blobs and such nicely as well.

But if you would like more info on image processing read the PDF in the link below.
Here is a link how Jasper does images it may help:
http://www.ece.uvic.ca/~frodo/publications/icassp2004.pdf

Java_Jasper - 9 years 4 months ago

Thank you friend

netti royala - 9 years 4 months ago

So you are trying to display a huge image on Jasper server, right? Maybe you can add an automatic image resizing function to tailor the source image to the proper size, just as is mentioned in this post. Hope it can help you a little.

By the way, if you find proper situation, please share with us, ok? Thanks.smiley

http://stackoverflow.com/questions/2772352/displaying-really-huge-images...

cathyhill345's picture
Joined: May 12 2013 - 8:31pm
Last seen: 8 years 9 months ago
Feedback