Jump to content
JasperReports Library 7.0 is now available ×

margin problem


2004 IR Help

Recommended Posts

By: Dmitry Beransky - dberansky

margin problem

2005-09-14 11:42

Hi,

 

I'm having a weird problem with margins in JasperReports 1.0.1. Take a look at this pdf: http://www.dembel.org/mfs_pages.pdf. The file has two pages. Both pages are identical pages of the same report, but the first page is part of a report generated using iReport (v. 0.5.1), while the second page was generated by calling JasperReports directly from Java code.

 

The first page is what the report is supposed to look like.

 

On the second page, you can see that all the text is shifted up by approximately the hight of a single line. But only text is shifted. Horizontal lines are positioned exactly where they are supposed to be (so these lines are now shifted relatively to text).

 

I've tried two different reports with the same code and the problem seems to be persistent. Here's the code responsible for filling out a report:

 

InputStream compiledReportIn = getCompiledReportAsStream(); // this simply calls Class.getResourceAsStream()

compiledReport = (JasperReport) JRLoader.loadObject(compiledReportIn);

 

HashMap hashMap = new HashMap();

hashMap.put("query", query);

hashMap.put("title", title);

hashMap.put("beginningDate", formatDate(startDate));

hashMap.put("endingDate", formatDate(endDate));

hashMap.put("sourcesUses", descriptor.getTypeName());

report = JasperFillManager.fillReport(compiledReport, hashMap, getConnection());

 

 

This code has worked just fine for a year until we upgraded to 1.0.1. Any thoughts what might be cause the margin problem?

 

thanks

 

 

 

 

By: jorge - sirion_oef

RE: margin problem

2005-09-14 17:34

the libs in the libs dir of ireport are all the same that the libs in your libs dir?

 

is the only format that causes this error?

 

did you recompile your report with the new version of jasperreports?

 

ireport and your application are using the same report or one of them uses a copy?

 

 

 

 

By: Dmitry Beransky - dberansky

RE: margin problem

2005-09-14 20:13

>the libs in the libs dir of ireport are all the same that the libs in your libs dir?

 

Is there anything beyond jasperreports.jar I should pay attention to?

 

> is the only format that causes this error?

 

Good point. I'll test this tomorrow

 

> did you recompile your report with the new version of jasperreports?

 

Yes, the report was compiled with iReports 0.5.1 and then then compiled file was used in the Java app.

 

> ireport and your application are using the same report or one of them uses a copy?

 

I'm not sure what you mean. I compile the report with iReport, then copy the compiled file to a http server. My app loads the compiled file using the URL class.

 

 

 

 

 

By: jorge - sirion_oef

RE: margin problem

2005-09-15 09:16

>the libs in the libs dir of ireport are all the same that the libs in your libs dir?

 

i am talking about that all the libs of jasperreports be in ireports libsdir and in your appdir

 

 

what was your old version of jasperreports? try watching the changes since that version to the actual, the actual version has a lot of changes comparing it with the one year old version

Link to comment
Share on other sites

  • Replies 0
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

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