Jump to content

Report gaps and pdf truncation problem


atanupanda

Recommended Posts

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.

Link to comment
Share on other sites

  • 3 months later...
  • Replies 1
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Hi Atanu,

 

I am also facing the similar problem like your issue #1 with JasperReport and couldn't find out any solution. So I posted here for help. But the interesting thing is no one here bothers to reply to your queries nor even they say whether this is the present limitation of JasperReport. This is pathetic!!

 

Here is my post:

 

http://www.jasperforge.org/index.php?option=com_joomlaboard&Itemid=215&func=view&catid=8&id=32050#32050

 

You will even find another person in my post who has also faced similar issue but didn't get any solution.

 

Regards

Santanu

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...