Jump to content
Changes to the Jaspersoft community edition download ×

Two subreports in detail


Recommended Posts

By: Tché­ tche

Two subreports in detail

2006-02-01 02:20

I´ve read some threads that seemed to be like this one, but to ensure the success of my quest I will go straight to the point - to my point!

I have a master report, let´s say about an order, and two subreports, let´s say one for the items and other one for the terms of payment. The subreports are tiled horizontally, occupying the whole detail band. Now imagine that both subreports are independent, what means one can requires two pages and the other five. The expected behavior is that both start in the first page, with no overlapping, and go to the end - the end determined by the largest one. The space occupyed by the smallest one must be blank in the last pages. This is what I want!

Well, well, well. The truth is that the superior subreport grows till the end of the detail band, takes the enough number of pages to complete and then the second one starts. Fighting a lot against my report designer - iReport - gets me to have the second one overlapping the first one, that insists on taking the whole detail band for itself.

Does anyone have any iddeas?

 

 

 

 

By: C-Box - c-box

RE: Two subreports in detail

2006-02-01 06:15

Have you read some of my postings concerning that topic... I remember having answered this kind of question about ten times.....!??!?

 

but anyway... use dummygroups and put both reports in its own dummygroupheader. so you are for sure, that they won't overlap (so I do successfully with up to 10 subreports)!!!

 

hth

C-Box

 

 

 

 

By: Tché­ tche

RE: Two subreports in detail

2006-02-01 09:29

I must have read. But my tests with dummy groups didn´t work! Would I be doing something wrong? Is there any possibility of you send me a jrxml file so I could get the details?

In my tests, the superior group header (imagine I have two) grows till the end of the detail band. It doesn´t respect the defined height.

 

Thank you so far!

 

;^)

 

 

 

 

By: C-Box - c-box

RE: Two subreports in detail

2006-02-01 13:38

As I do something similiar with invoices, items and even paymentterms - I think I missunderstood your purpose probably.

 

I thought you would have an output like this

 

Page1

title

Items-AtoG

 

Page2

Items-HtoM

 

Page3

Items-NtoX

payment-terms

 

This is what I do... so my details are a subreport (actually even three nested ones) and my paymentterms is also a subreport.. the itemsubreport moves the paymenttermssubreport till the end of the whole report... so please describe a bit further what you want...

 

If I've understand your first posting right, you want it side by side and not below each other?!?!?!

 

C-Box

 

 

 

 

By: Tché­ tche

RE: Two subreports in detail

2006-02-02 03:16

I want my subreports one below the other. Something like this:

 

Page1

.Header

.Sub1: items 1-5

.Sub2: terms 1-3

 

Page2

.Header

.Sub1: items 6-8

.Sub2: <blank>

 

It also could be like this:

 

Page1

.Header

.Sub1: items 1-4

.Sub2: terms 1-5

 

Page2

.Header

.Sub1: <blank>

.Sub2: terms 6-10

 

In the first case, I have more items than terms, so it needs a page break to show the last items. In the second, I have more terms and the page breaks to show the others.

The main point here is that the height and absolute position occupied by both subreports must be fixed: if one demands a page break, it must occupy the fixed portion of the new page, leaving the other subreport´s portion blank.

 

Is that possible?

 

Thanks!

 

 

:^)

 

 

 

 

 

 

By: C-Box - c-box

RE: Two subreports in detail

2006-02-03 00:54

IMHO - I don't think that this is possible... as your first subreport runs before the second one it will take the whole space available and will create page breaks by itself. When the last item is reached, the filler returns and the second subreport is filled.

 

As you want TWO datasources (so I assume you have one datasource for your items and a second one for your terms) at ONE Page alternating (so 5 items + 3 terms --> 2 items again + 0 terms).

 

So without trial and error and wasting much time I would not have an idea right now... but perhaps Teodor has one!?

Perhaps you should merge your datasource before filling the master report to your needs.. so that you just have one datasource and decide at a certain field if its a item-record or a terms-record... than it would be no problem!

 

hth

C-Box

 

 

 

 

By: Tché­ tche

RE: Two subreports in detail

2006-02-03 03:02

I see. I was also thinking of merging the data in a datasource. If no one has better or magical ideas, that is going to be the only way.

 

Thank you a lot for your attention!

 

;^)

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