manishwadhwa Posted October 10, 2008 Share Posted October 10, 2008 Hi,I have created some reports for my application (Based on Struts 2.0). Now I want to display some bar charts in my reports. I have tried it in many ways but haven't got success.I want to populate Barchart using java beans.It would be great if someone can provide me any small example (source code) for it.Thanks. Link to comment Share on other sites More sharing options...
pnvswamy Posted October 14, 2008 Share Posted October 14, 2008 HI, Just populate the data in the form of Bean classes and put all the beans information in the List and pass that list to the parameter to the JRBeanCollectionDataSource class.Thats it. One more thing is u have to add 2 jars:JFreeChart.jar and JCommon.jar Link to comment Share on other sites More sharing options...
manishwadhwa Posted October 15, 2008 Author Share Posted October 15, 2008 Thanks for your reply.I am not clear that in what form, I should populate the data in the javabean and how this data would be retrieved by the API to display the charts.Can you please provide me a sample application that simply display a barchart. It will be more helpful if the application uses the JChart with struts2 framework.Thanks. Link to comment Share on other sites More sharing options...
shrije Posted October 15, 2008 Share Posted October 15, 2008 There are enough samples in the 'demo' folder of jasper reports source code. Link to comment Share on other sites More sharing options...
pnvswamy Posted November 4, 2008 Share Posted November 4, 2008 HaiI am hetting Exception in JRXML compilationException is getting like this : Messageorg.xml.sax.SAXParseException: Element type "pen" must be declared.Please help me 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