Jump to content
JasperReports Library 7.0 is now available ×

Subreport with columns


Recommended Posts

By: Gabriel - acharat

Subreport with columns

2002-10-15 06:11

I have one subreport with 4 columns.

In the main report I want 3 lines per column in the subreport, then I determine a specific height.

 

But the subreport doesn't respect this height and it goes to the end of the page with only one column.

What can I do ?

 

Thank you,

Acharat

 

 

 

By: Teodor Danciu - teodord

RE: Subreport with columns

2002-10-15 12:44

 

Hi,

 

That's a tricky one!

:))

 

The only solution I see is to introduce a group in the

subreport that will break with every 3 records,

and use isStartNewColumn="true" for it.

Check the "BreakGroup" in the "jasper" sample.

 

I've never tried it, but since you will do it anyway,

maybe you could tell me if it worked.

It might be that the page footer of the subreport still

go to the bottom of the page, but it might also work

very well.

 

Waiting for your confirmation.

 

Thank you,

Teodor

 

 

 

By: Gabriel - acharat

RE: Subreport with columns

2002-10-18 04:52

Hi,

 

It works and it doesn't work.

Now the subreport break column every 3 records. But, I have a page break too after the subreport, I don't know why.

If I put isStartNewColumn="false" then the subreport doesn't break in columns but the section after the subreport remains in the same page, immediately after.

 

Thank you,

Acharat

 

 

 

By: Teodor Danciu - teodord

RE: Subreport with columns

2002-10-18 12:26

 

Hi,

 

Well, ... sorry...

Thanks for trying it.

 

I'll give it a thought and maybe come up with

a solution.

This requirement of yours never crossed my mind.

 

Thank you,

Teodor

 

 

 

By: Teodor Danciu - teodord

RE: Subreport with columns

2002-11-11 20:57

 

Hi,

 

If I understand correctly, you want to control the

number of records per column in your subreport.

 

Lets say we have a subreport with 2 columns and

we want to display 3 records per column.

As we already saw, this can be achieved using

a dummy group that breaks with every 3 records

and starts a new column in the subreport.

 

But I'm not sure what you would expect the report

engine to do when the subreport data source

contains more than 6 records.

I have tested this and as I expected, the subreport

will provoke a page break to the master report and

it will continue with the 7th record on a new page.

For me, this is exactly what it should do.

 

Can you explain to me what did you expected to

see in this situation?

Maybe I didn't quite understand your problem.

 

Thank you,

Teodor

 

 

 

By: Gabriel - acharat

RE: Subreport with columns

2002-11-12 03:30

Hi,

 

In this case yes, for me too, in the 7th record the correct is a page break.

But in my test, if I have 5 records for example the page break occurs too, immediately after the subreport.

But if you have tested and this not occurs for you, then certainly I'm doing something wrong. I will do more tests.

 

Thank you,

Acharat

 

 

 

By: Teodor Danciu - teodord

RE: Subreport with columns

2002-11-12 12:47

 

Hi,

 

Oh, I see what you mean.

That page break is provoked by the summary

section of your subreport.

On multi-column reports or subreports,

the summary section will print on a new page

if the last page has started to fill second column.

This is because the summary section is wide as

a page and not as a column. See?

 

If you don't display anything on this summary

section, the you can force the engine to completely

ignore it either by deleting the <summary> element

from the subreport or by using

a <printWheExpression> that always returns

Boolean.FALSE for this band.

It might be that only the second solution works and

only if you use a recent version of the JasperReports library.

 

I hope this helps.

Teodor

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