paulchurchward Posted January 5, 2011 Share Posted January 5, 2011 Hello,I have a very simple report that only contains a single line graph. I am displaying it as a PDF froma a java web application (Using Spring). The resulting PDF is creating a multiple sets of axis and on each axis only plotting the last added data point.See attached pdf and jrxml Thanks Code: Post Edited by paulchurchward at 01/05/2011 20:56Post Edited by paulchurchward at 01/05/2011 20:59 Link to comment Share on other sites More sharing options...
Teodor Danciu Posted January 6, 2011 Share Posted January 6, 2011 Hi, Put the chart element in the summary section, not in the detail. I hope this helps.Teodor Link to comment Share on other sites More sharing options...
paulchurchward Posted January 6, 2011 Author Share Posted January 6, 2011 Thanks. That did the trick. I only see one graph now. Oddly though only the last object I put into the list that is wrapped by the JRDatasource is being graphed. ie: List<?> someList = new ArrayList<?>();someList.add(new SomeObject(1));someList.add(new SomeObject(1));someList.add(new SomeObject(1));JRDataSource = new JRBeanCollectionDataSource(someList);only the last object is showing up on the graph... Link to comment Share on other sites More sharing options...
Teodor Danciu Posted January 6, 2011 Share Posted January 6, 2011 Hi, The resetType attribute of the chart dataset should be "Report". I hope this helps.Teodor Link to comment Share on other sites More sharing options...
paulchurchward Posted January 6, 2011 Author Share Posted January 6, 2011 Im not sure what you mean by resetType, I don't see this attribute in the jrxml file.Thanks !- Paul Link to comment Share on other sites More sharing options...
Teodor Danciu Posted January 6, 2011 Share Posted January 6, 2011 Hi, I suggest you use iReport to design your reports. In JRXML, <categoryDataset> can contain a <dataset>, which in turn has the attribute resetType. I hope this helps.Teodor Post Edited by teodord at 01/06/2011 14:47 Link to comment Share on other sites More sharing options...
paulchurchward Posted January 6, 2011 Author Share Posted January 6, 2011 I am using iReport actually which is how my jrxml came to be. From the attached jrxml file, can you plse show me the necessary modifications. Also, can you tell me where I possibly went wrong in iReport ? Thanks very much Link to comment Share on other sites More sharing options...
Teodor Danciu Posted January 6, 2011 Share Posted January 6, 2011 Hi, Sorry, I did not pay attention to your series. You have only one dot because all numeric values are set for a single category, the one coming from your $P{JOB_NAME} parameter.With only one job name, you see only one dot. I suspect your job names must come from a report field as well. I hope this helps.Teodor Link to comment Share on other sites More sharing options...
paulchurchward Posted January 6, 2011 Author Share Posted January 6, 2011 Oh, that makes sense. I cant believe I overlooked that. Thanks! 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