Jump to content
We've recently updated our Privacy Statement, available here ×

Report gaps and pdf truncation problem


atanupanda

Recommended Posts

  • Replies 2
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

atanupanda wrote:

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 as
for bar chart
Code:

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 chart

Code:
[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.

<br><br>Post edited by: atanupanda, at: 2007/07/09 12:26

[file name=trucated_report.zip size=96655]http://www.jasperforge.org/components/com_joomlaboard/uploaded/files/trucated_report.zip[/file]
Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...