goldsmithsa Posted December 23, 2009 Share Posted December 23, 2009 We are currently evaluating the use of JasperReports as a framework for developers to create reports. Based on my limited experiece, I wonder if the following scenario can be accomplished:We would like to use iReport, for ease, to create a report that embeds a flash based gant chart. We would want to execute a simple query to populate some data in a table above the flash chart (this part is easy using iReport), and I suppose "embed" within the report a jsp (or html) page that will produce the flash chart, where the html page will look something like the code section below.So here are the questions:1. Is it possible to embed an html/jsp page in a report?2. How could we make the values selected from the input controls available to the embedded HTML/JSP page?3. Is there a better way to do something like this that you can recommend?Thanks for your help!Code:<html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <title>AnyChart Sample</title> <script type="text/javascript" language="javascript" src="./js/AnyChart.js"></script> </head> <body> <script type="text/javascript" language="javascript"> //<![CDATA[ var chart = new AnyChart('./swf/AnyGantt.swf'); chart.width = 700; chart.height = 300; chart.setXMLFile('./anychart.xml'); chart.write(); //]]> </script> </body> </html> Link to comment Share on other sites More sharing options...
Teodor Danciu Posted January 4, 2010 Share Posted January 4, 2010 Hi, You could embed HTML snippets like that in the the report exported to HTML if you would use generic element support.In order to do this, you would need to implement an HTML export handler, to teach the HTML exporter how to deal with your generic element for Flash.You can check the /demo/samples/genericelement sample provided with the JR project package, to see how a similar HTML snippet is embedded into HTML output. A more complicated solution to support Flash is to implement a full-blown JR component, similar to the Open Flash Chart component in the /demo/samples/openflashchart or similar to the Fusion-based charting component shipped with JR Pro. I hope this helps.Teodor 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