COGNOiSe.com - The IBM Cognos Community

IBM Cognos 10 Platform => Cognos 10 BI => Report Studio => Topic started by: sergiord2016 on 29 Mar 2017 04:12:38 AM

Title: page-break in master-detail
Post by: sergiord2016 on 29 Mar 2017 04:12:38 AM
Hello everybody , i have made this master detail

(http://i63.tinypic.com/dzufli.jpg)

I want to make a page break for each master data

Also if it is possible i want to not show the master header if no detail data is avaliable , for example this case i don't want to show C.S. BRUJULA because it dows not have any detail data:

(http://i68.tinypic.com/2eq9xth.jpg)

Thank you in advance ,
Title: Re: page-break in master-detail
Post by: rockytopmark on 29 Mar 2017 08:06:54 AM
Use Page Sets for the Master to get your desired page breaks.  To eliminate the no data pages, set the filter on the query you use for the Page Sets to only return records that have at least 1 detail row.

To add a Page Set:
1. Click Page Explorer and select Report Pages
2. From the toolbox, click and grab Page Set and drag it into the Report Pages pane
3. Click and Drag your existing Page under the detail folder of the new Page Set
4. Click on the Page Set and assign it a query, that as mentioned above, will produce only the Master values with at least 1 row of data
5. Set the Grouping and Sorting property for the Page Set to the desired item
Title: Re: page-break in master-detail
Post by: sergiord2016 on 29 Mar 2017 08:42:41 AM
Thank you for the answer , i did all that but the pages does not break for each master data.

Two or more master data are palcede in the same page...
Title: Re: page-break in master-detail
Post by: rockytopmark on 29 Mar 2017 09:13:25 AM
You may need to remove the master section from the report page, and in-turn lose the existing Master-detail relationship.
Then, create a new master detail relationship between the list query and the page set query.
Create a new text item above your list that is sourced from the Page Set query.
Title: Re: page-break in master-detail
Post by: New_Guy on 29 Mar 2017 09:32:40 AM
Hi,
Did you try placing a singleton(available in toolbox) and then place the page set grouped item in the singleton. Is it relational or dimensional report?
Good luck
New guy
Title: Re: page-break in master-detail
Post by: rockytopmark on 29 Mar 2017 12:50:46 PM
I have attached a simple page set example using the Go Data Warehouse (query) package.

No singleton is necessary.

Report uses 1 query... same for Page Set and List.  Page Set is grouped by Order Method type, so we get a new page for each Order Method.
Title: Re: page-break in master-detail
Post by: sergiord2016 on 29 Mar 2017 02:17:54 PM
thank you all for your replies