Jump to content
Changes to the Jaspersoft community edition download ×

HTML image display (nullpx) still a problem


keogz

Recommended Posts

i know this has been in alot of posts and i've been reading them and trying to add the necessary codes and parameters to my BaseReportAction.java for my jsp to HTML jasper report,but to no avail....attached here is the BaseReportAction.java (in txt format)...if anyone can pls help me asap..i've been pondering on this for a week now..i need help..i can see how its suppose to look like on iReport but not when i export it to my Web app using tomcat...

Post edited by: keogz, at: 2007/07/27 08:53

Link to comment
Share on other sites

  • Replies 8
  • Created
  • Last Reply

Top Posters In This Topic

What is the exact problem? Cant the nullpx image be found by the report?

 

By the way try to use absolute urls.

 

exporter.setParameter(JRHtmlExporterParameter.IMAGES_URI, "../../servlets/image?image=");

 

Relative url's are a bi*ch. The request object has many tools that allow constructing the correct image link by constructing the hostname and context path.

Link to comment
Share on other sites

i created a nullpx transparent gif and copied it into where the .jasper report is. and it still wont find it...i've tried to use that code you placed but that directory /address doesnt exist...the address is

 

../admin/report/nullpx.gif

 

but how do i point it at there exactly? as you can see, i've tried it in the code but to no results...

thats the last problem i've got...to show images in the HTML jasper report...all the nullpx's spacers wont show at all..and leaves the HTML page really bad looking...if you want to see other associated files, pls tell me i can upload it for you....

Post edited by: keogz, at: 2007/07/30 05:44

Link to comment
Share on other sites

Hi,

 

You need to take a closer look at the supplied /demo/samples/webapp sample.

There you can see that the HTML exporter uses the IMAGES_URI exporter parameter to point to the image servlet responsible for delivering the images.

 

If you don't have any image in your reports and you don't care about the image servlet at all, then you probably want to make use of the IS_USING_IMAGES_TO_ALIGN exporter parameter. When set to Boolean.FALSE, the px images are no longer used for aligning HTML content.

 

I hope this helps.

Teodor

Link to comment
Share on other sites

Thanks for your reply that helped me as I also was facing the same problem.

 

The demo folder is not included in IReport.

 

I am using IReport right from 0.3.1 version till 2

But the demo folder is not included in that distribution.Can you please make appropriate changes in the distribution as this will reduce much of the queries in the forum for users of IReport

 

Please point me if I am downloading the wrong distribution

 

Anyway IReport and Jasperreport is great.

 

Thanks for such a nice product

 

Bye for now

 

CSJakharia

Link to comment
Share on other sites

  • 3 months later...

Hi all

 

I too had this issue of blank images popping in the HTML file every time I printed the report (ireport version 2.0.0 and 2.0.1 )

 

EASY Solution :

goto OPTIONS >EXPORT OPTIONS

Under HTML EXPORTER > untick [is using images to align]

 

 

and you get the desired output !

 

Cheers

(simplifying solutions)

Link to comment
Share on other sites

  • 4 years 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...