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

subreport empty space!


francesco334

Recommended Posts

Hello all,

 

every times that I add a subreport in my main report, I have some problems:

1) the left margin of subreport doesn't equal to the left margin of the main report. How can I set left margin of subreport to the same left margin of main report??

 

2) If subreport has repeated values, it add empty rows to the main report!! How can I do to solve this problem?

I don't understand if I wrong in the subreport or in the main report!

 

3) Then, even in the same main report, in the detail band, when I repeat a block of data, it add much blank rows to the pdf!! (services like Hotel, Air, Insurance in my zip file example)

 

I send you a zip, with the main ("AirServices") and subreport files jrxml (like "ProfilesFatt" in the Booking footer), and the pdf result!

 

Thanks for all your response!

 

Francesco [file name=Riepilogo.zip size=63918]http://www.jasperforge.org/components/com_joomlaboard/uploaded/files/Riepilogo.zip[/file]

Link to comment
Share on other sites

  • Replies 9
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

1. You need to make the following:

 

-set left margin = 0 for subreport (Edit > Report properties > page margin), after do not forget to recompile subreport!

 

-place subreport on main report with parameter left = 0

 

The rest I shall try to make later.

Link to comment
Share on other sites

Hello All,

 

I have read many scripts in this forum about this problem!

 

I have this problem in export report in txt file and pdf file. I have tried to make, from iReport, "Remove line when blank", and some blank lines have been deleted.

But there is always some blank space, that I don't understand why!!

 

I send you a zip containing txt file and the jrxml for to see the difference between report and exported file!

 

I hope that anyone can help me!!

 

Thanks,

Francesco

 

[file name=mail.zip size=5513]http://www.jasperforge.org/components/com_joomlaboard/uploaded/files/mail.zip[/file]

Link to comment
Share on other sites

[color=#FF0000]AHHHHHHHHHHHHHHHHHHHHHHHHHHHH! [/color]What is this???? I've seen many Reports but this "design" is quite "space-waste"....:blink: So your empty space comes from the [color=#FF0000]really really big[/color] detailband..... you must be carefull with space between the last element and the band-bottom... also with empty space to get some distance between fields.... Try to build some dummy-groups see the Tips-And-Tricks at JasperHomePage ... there is (was!?!?) a tip from Teodor how to handle such big bands! :-)You must know the page-break logic of JR a bit and make your design fitting this logic. hthC-Box

 

Post edited by: CBox, at: 2006/09/19 13:50

Link to comment
Share on other sites

again me:

 

you should also play around a bit with PositionType = FLOAT instead of FixRelativeToTop

Your SubReports are stretching itself so it's no need to reserve the space for them. Just put your elements below each other and set Postion type to FLOAT so it moves downwards itself.

 

hth

C-Box

Link to comment
Share on other sites

Hello,

 

thanks for your responses....

but..

I have tried to set PositionType=FLOAT, but that doesn't change much in my report. The empty space remain!

 

A thing that I don't understand is why, if I add a subreport on a line, and I add a staticText on the second line of my report, when I export to pdf, the StaticText is overgrown by the subreport lines!!!

 

How can I do for write Static text after the end of a subreport???!!

 

Thanks for all,

Francesco

Link to comment
Share on other sites

Then CBox,

 

if I try to reduce the height of detail band (with all the subreport in that band) I have this error when I export to pdf or txt :

 

net.sf.jasperreports.engine.JRRuntimeException: Subreport overflowed on a band that does not support overflow.

at net.sf.jasperreports.engine.fill.JRVerticalFiller.addPage(JRVerticalFiller.java:1112)

at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillPageBreak(JRVerticalFiller.java:1203)

at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillColumnBreak(JRVerticalFiller.java:1228)

at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillDetail(JRVerticalFiller.java:613)

at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillReportContent(JRVerticalFiller.java:248)

at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillReport(JRVerticalFiller.java:132)

 

How can I do???

my problem is that when I add a subreport, the follow StaticText object is not written after the end of the subreport! Even if I change the PositionType=FLOAT the problem remain!

 

Thanks,

Francesco

Link to comment
Share on other sites

In what band you have put your subreports? This message comes only if you put an stretching subreport in static bands (like page-footer/header)?!?!?!?

 

You should attach your JRXML again.

 

I must throw an eye on it, so it's easier to see what you've changed.

 

If a textelement overlaps subreport content then you the textelement is not set to position-type = float.

 

So please attach your JRXML.

 

till later

C-Box

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