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

Sub report on a new page


mulcamd

Recommended Posts

 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.

Link to comment
Share on other sites

  • Replies 6
  • Created
  • Last Reply

Top Posters In This Topic

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
Link to comment
Share on other sites

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

Link to comment
Share on other sites

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?

Link to comment
Share on other sites

  • 2 years later...

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

 

 

 

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