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

export creating extra row between bands


lknueve

Recommended Posts

 Hello. I have a report I have been trying to export into Excel now for a while and have had several issues. The current one is that after the last line of data detail, I am seeing a blank line between that row and the first row in the next band (Column Footer). I have deleted all bands that are not in the report, set all margins to 0, the Column Footer band items are set to have Top = 0, I have the following properties set to TRUE - net.sf.jasperreports.export.xls.remove.empty.space.between.rows and net.sf.jasperreports.export.ignore.page.margins. As well, I have the Detail band height set to the last element's top + height to make sure that it's not showing empty space. I'm attaching both the jrxml and a copy of the export. If anyone can figure out why this extra blank line (highlighted) is there, please tell me! Thanks in advance!

Link to comment
Share on other sites

  • Replies 5
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

I don't know why blank line here :(

In this cases I'm moving all fields into frames in every section and "to paint" frames borders into the various colors. After that i see in what band appear empty string.

With best regards



Post Edited by sanbez at 11/10/2011 05:32
Link to comment
Share on other sites

What version of JR?
I replace stored procedure with simple sql and I haven't empty rows on JR 4.0.2 and 4.1.2.
I'am even set net.sf.jasperreports.export.xls.remove.empty.space.between.rows=false on report.
Empty string is not displayed in any case.
Will you see blank line again on attachment report?

Link to comment
Share on other sites

 ok, I'm using version 3.7.6....

I took the copy you had uploaded and did 2 tests and am attaching screen prints of results....

test #1 -> set report back to calling stored procedure -> results: still see empty row (see storedProcRun.png attached)

test #2 -> set report to query the resulting table directly -> results: no empty row (see queryRun.png)

so now my question is why would a stored procedure add blank rows where query doesn't? That doesn't make sense to me....

Link to comment
Share on other sites

 ok, think I figured it out with some help from co-worker, but still not sure why this behavior is happening. 

The fix was I had the next row in the "Column Footer" section....after moving the next row to the "Summary" section, the empty row went away? How we found this, was when running the stored procedure in query analyzer with output going to text, SQL was generating a blank line at after the result set...so for some reason iReport was seeing that blank line as another record? I'm guessing? Either way, the report is fixed now, so thank you!

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