andysusanto Posted August 29, 2006 Share Posted August 29, 2006 hai, how to show a chart from a servlet ?, i am using ireport 1.2.5 and i add a Boolean value in "Increment When Expression" when i run from ireport that chart is show. but when i try to call from a servlet, that i chart cannot show. And there is no error. how a code inside a servlet to show that graph? TIA, andy susanto Link to comment Share on other sites More sharing options...
bklawans Posted August 30, 2006 Share Posted August 30, 2006 Take a look at the webapp sample that is included with JasperReports. The html.jsp shows some options to the JRHtmlExporter that need to be set for the images to work correctly. (Take a look at the HTML returned from the servlet and you will probably see that the image tat used for the chart is wrong.) -Barry Link to comment Share on other sites More sharing options...
andysusanto Posted August 30, 2006 Author Share Posted August 30, 2006 hai Barry, i have does not have a clue anymore. This i attach my code JSP and my .jrxml, i hope you can take a look for a while why my jasperreport doesnot show TIA, andy susantoPost edited by: andysusanto, at: 2006/08/30 08:57 Link to comment Share on other sites More sharing options...
andysusanto Posted August 30, 2006 Author Share Posted August 30, 2006 [file name=ROOT.zip size=7458]http://www.jasperforge.org/components/com_joomlaboard/uploaded/files/ROOT.zip[/file] sorry i forget this file TIA, andy susanto Link to comment Share on other sites More sharing options...
bklawans Posted September 1, 2006 Share Posted September 1, 2006 Take a look at the generated HTML (via View Source or the equivalent in your browser) to figure out where the browser is looking for the images. Then figure out where the images actually have been saved, which depends on the options you set for the JRHtmlExporter. In your case it looks like you haven't set any, so the images are stored on disk in the current directory. When using images you need to think of two things - where do I want to store the images (disk? session?) and how the user will access them (servlet? Direct URL?) and then make sure you set up the exporter to put the images in the right place, and your code to serve them up correctly. Take a look at the JavaDoc for the options that the JRHtmlExporter supports. -Barry Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now