Sub report on a new page

0

 Hi,

I know this topic has been asked before and I have read the answers. Yet I do not get it right.

I have a master report with 2 sub reports. What I learned from the responses in the forum is that I have to create for each sub report a new group. In the group header I placed the sub report.

Of the second group header properties I checked the box "Start on a new page".

Question:

  1. Although I checked this box, the 2e group with the sub report is not printed on a new page. Why is this?
  2. Should I still make a new group for each sub report in iReport 4.x or are there other ways to have each sub reports  printed on a new page?

I'm using iReport 4.0.2.

mulcamd's picture
93
Joined: Mar 16 2011 - 11:47am
Last seen: 1 year 2 months ago

6 Answers:

0
Dear Dick,
Give specific design of what you want to do.
i.e. subReports are on Detail Band or what else...

George.
kolaitis's picture
100
Joined: Oct 8 2008 - 4:09am
Last seen: 10 years 6 months ago
0

Hi George and other forum members,

 

There is a difference between what I want and what I get. Ofcourse, this happens ofter in life, but perhaps this issue can be solved.

What I want:

Two reports in one output behind each other, each report closing with the totals.

Titel

Headers_1

------------------------- report 1
-----------------------
------------------------
                  total

<new page>

headers_2

  ------------------------- report 2
-----------------------
------------------------
                  total

What I did, see attachment

Master report

  1. Titel
  2. Page
  3. Column
  4. FirstGroup Group Header
    Here I added my first sub report
  5. SecondGoup Group Header
     Here I added my second sub report  
    I checked the "Start on a new page" checkbox
  6. Detail
    Empty and height : 0
  7. SecondGroup Group Footer 2
    With a total field
  8. SecondGroup Group Footer 2
    With a total field  
  9. Column Footer etc

 

What I get is:

Titel
---------------------First subreport
------------------------------------------
----------------------------------------
 ---------------------Second subreport
------------------------------------------
----------------------------------------
                      Total footer 2
                        Total footer 1

So 2 problems:

  1. I get no page break between sub report 1 and 2
  2. Both totals only are printed at the end of the report and I would expect different 

It is a very basic report. The master report I added as a attachment. It is very small. It acts only as a container.

 



Post Edited by mulcamd at 05/09/2011 15:30



Post Edited by mulcamd at 05/09/2011 15:35
mulcamd's picture
93
Joined: Mar 16 2011 - 11:47am
Last seen: 1 year 2 months ago
1

Suggestion :

1) Create only one Group.

    Place on, your first subreport.

    Total, in your subreport.

2) Expand summary Band.

     Edit / Report Properties / More / Summary on a new Page  (true)

     Place on, your second subreport.

     Total, in your subreport.

- If you wish a grandTotal, assign  Subreport Return values parameters

  adding them in a variable on your main report.

Regards......

kolaitis's picture
100
Joined: Oct 8 2008 - 4:09am
Last seen: 10 years 6 months ago
0
Hi George,

Again a very helpful advice!. It works!

General question: how would to design a report with 4 sub reports. Should I make for each sub report a group or put the second and the other sub reports all in the summary with page breaks in between?
mulcamd's picture
93
Joined: Mar 16 2011 - 11:47am
Last seen: 1 year 2 months ago
0

Design is subject of how do you want to see the result.

Simplest design is with page break.

Good day.

kolaitis's picture
100
Joined: Oct 8 2008 - 4:09am
Last seen: 10 years 6 months ago
0

Hi All,

I just finished wrestling with putting together a report with 4 sub reports. Some key things I found where:

1.     make sure all your subreports have the proper height
subreport height (max height allowed) = master report height - master report page header band height - master report page footer band height - master report top margin - master report bottom marge

2.     if you have an image in the master report header/footer band make sure you have the right "Scale Image" setting. I had the image in my page header set to 'scale image' = 'retain shape' which apparently cause the page header to be larger that the size I allotted it (100px). Once I change the 'scale image' setting to 'fill frame' that solved my issue. feel free to experiment with the other possible 'scale image' setting.

3.     In the master report summary band space your subreports with page breaks between like below. please note that the subreports dont need to have actual height spelled out in the master report, but I found it easer to make the widths correspond exactly.

·       subreport1 (top = 0, height = 30)

·       page break (top = 31, height = 1)

·       subreport2 (top = 32, height = 30)

·       page break (top = 63, height = 1)

·       etc ...

 

 

 

swarm357's picture
Joined: May 31 2012 - 9:48am
Last seen: 3 years 6 months ago
Feedback