atanupanda Posted July 9, 2007 Share Posted July 9, 2007 Hi I am working with iReport 1.3.0 for the last 4-5 months. I am not very well in jasper reporting. Now i have some problem which is very harmful for company's project. We are handling with very large amount of data we need to show it as html and pdf format.I have two problems: 1.In my report i am displaing line chart or bar chart for different sets of data. This data size may be 100,300,500 .This comes from database as a list of database dynamically. I pass it to the report through JRBeandatasource.But problem is that while displaying the report i need to dynamically change my report width to capture all the data. But this dynamically change of my report's width is happening for html only ,for pdf it is showing some part but rest of the part is truncated. this very serious problem. I have written some customizer class for line and bat chart asfor bar chartCode:public class BarChartCustomizer extends JRAbstractChartCustomizer{ public void customize(JFreeChart chart, JRChart jasperChart) { BarRenderer renderer = (BarRenderer) chart.getCategoryPlot().getRenderer(); String totalreport = (String)this.getParameterValue("totalreport"«»); int width = Integer.parseInt(totalreport) * 30; jasperChart.setWidth(width); }}for line chartCode:[code]public class LineChartCustomizer extends JRAbstractChartCustomizer{ public void customize(JFreeChart chart, JRChart jasperChart) { LineAndShapeRenderer renderer = (LineAndShapeRenderer) chart.getCategoryPlot().getRenderer(); String totalreport = (String)this.getParameterValue("totalreport"«»); int width = Integer.parseInt(totalreport) * 30; jasperChart.setWidth(width); }} where totalreport is no of points (100,300,500 ..like this ) Please tell me how to solve this problem of pdf truncation. It's very urgent. 2.Also there is another problem while trying to plot large dataset when plotting line or bar chart i am getting some space within y-axis and start of first point. But for little amount of data there is no gap within y-axis and start of first point. Please let me know what should i do to resolve this issue. It's very urgent for me. Also you can send some URL from where i can get some information to solve this problem. If any one doesn't understand my problem please please let me know i will try to give some more information on my problem. I am attaching the rar files which will clearly explain my problem in report. Thanks to read this large problem.Thanks in advance. [file name=trucated_report-a13d92b661b6db0577ec1b4b65b2ad91.zip size=96655]http://www.jasperforge.org/components/com_joomlaboard/uploaded/files/trucated_report-a13d92b661b6db0577ec1b4b65b2ad91.zip[/file] Link to comment Share on other sites More sharing options...
atanupanda Posted July 9, 2007 Author Share Posted July 9, 2007 Hi Another file for my report.ThanksAtanu Panda [file name=gaps_report-5ec00cfb6448475e461b591f4aedceeb.zip size=134607]http://www.jasperforge.org/components/com_joomlaboard/uploaded/files/gaps_report-5ec00cfb6448475e461b591f4aedceeb.zip[/file] Link to comment Share on other sites More sharing options...
codyjasperForge Posted July 10, 2007 Share Posted July 10, 2007 Hi atanupanda, I have developed several reports and exported to .pdf as well, I am unsure as to why Adobe changes the page settings, and I have yet to find a solution. It seems to me that the main report displays correctly, but and subreports that are included get shifted for whatever reason. The way that I solved my problem is by shifting all of my subreports -30 pixels left. When this is done the report displays correctly. If I do not do this, all of the subreports are truncated at the right margin. If you are able to find a solution, please notify me. Hope it helps... Link to comment Share on other sites More sharing options...
svenn Posted July 10, 2007 Share Posted July 10, 2007 I set the margins to zero in my subreport. I then make the width of my subreport the same size as the width of my main report minus the margins. The subreports display correctly. Link to comment Share on other sites More sharing options...
codyjasperForge Posted July 11, 2007 Share Posted July 11, 2007 svenn, what JDK, iReport version, Adobe version are you using?I am curious if this might lead to my problem...thanks a lot. Link to comment Share on other sites More sharing options...
svenn Posted July 11, 2007 Share Posted July 11, 2007 I'm currently using JDK 1.4 :ohmy:, iReport 1.3.3, Adobe 7. However I've been using iReport back to 1.1.# and Adobe 6 with the same results. Link to comment Share on other sites More sharing options...
atanupanda Posted July 11, 2007 Author Share Posted July 11, 2007 Hi Friends First of all very very thanks to give reply. Still i have not found any solution of my problem .I am not using any subreport in my report .there is only one report. The whole 100 or 300 or 500 points(each points have time and corresponding value) should be plotted in single report as html and pdf format.Data are coming dynamically . For html dynamic change of width is coming fine as Code:String = (String)this.getParameterValue(""«»); int width = Integer.parseInt() * 30; jasperChart.setWidth(width);where totalreport = 100 or 300 or 500 points coming dynmically. But in case of pdf this showing some part but rest of the part(this is large) is not showing. I am using jdk1.5 ,ireport 1.3.0,and adobe reader 8.0 Also for each cases ( html and pdf ) while trying to plot large no of dataset when plotting line or bar chart i am getting some space within y-axis and start of first point. But for little amount of data there is no gap within y-axis and start of first point. For little amount of dataset it looks nice but for large amount of data it showing very badly. Actually i have also seen that this gap is coming huge when this totalreport become huge. This gap is also dynamically changing depending on totalreport ;Is there any solution by which plotting will be start from very close to y-axis. If you need any other information for this problem please let me know about that. This is very serious issue for me. Thanks in advance.Atanu Panda 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