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

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


netti royala

Recommended Posts

  • Replies 7
  • Created
  • Last Reply

Top Posters In This Topic

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"));

Link to comment
Share on other sites

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 .

Link to comment
Share on other sites

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

 

 

Link to comment
Share on other sites

  • 2 weeks later...
  • 3 months later...

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.http://community.jaspersoft.com/sites/all/libraries/ckeditor/plugins/smiley/images/regular_smile.gif

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

Link to comment
Share on other sites

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