Display Chart on jsp page with value from another source

Hi.  I'm a newbie for jasper report

I want to show a chart from jasper on jsp page [Portlet in liferay]. and value to draw a chart I get from webservice.
and I not found a solution to use data from another source and didn't use jrxml or jasper file.

Can you introduce this case to me?

zaint_dragon's picture
Joined: Dec 22 2014 - 10:22pm
Last seen: 8 years 7 months ago

1 Answer:

I'm not sure that you can reference a chart from a report outside of the report in a given java context. It's duplicated effort, and not the cleanest approach, but Jasper Community edition uses JFreeChart, so you could use that same library outside of JasperReports, within the JSP, and simply generate the same chart on the JSP.

And if you're getting the chart from a web service, it may be possibe to access that service directly from the JSP.

In short, it seems you can bypass Jasper all together for this requirement.

darth_fader's picture
Joined: Mar 7 2010 - 9:45pm
Last seen: 3 months 2 weeks ago

Now I found solution to pass value to jasper with xml, but I can't find solution to display report without jtxml or jasper file.

Have a solution to make it?

zaint_dragon - 8 years 8 months ago

not sure what you're looking for here. Jrxml and Jasper/Java files are the only ways reports can be generated; but if all you need to do is display a chart you can drop Jasper all together and just work with JFreeChart or Java based charts library.

darth_fader - 8 years 8 months ago