If you are unable to create a new account, please email support@bspsoftware.com

 

News:

MetaManager - Administrative Tools for IBM Cognos
Pricing starting at $2,100
Download Now    Learn More

Main Menu

Tree prompt, Page sets

Started by chrismgarvey, 10 Mar 2010 06:01:22 AM

Previous topic - Next topic

chrismgarvey

Hi All,

I am using Report Studio 8.4 with a transformer cube as my data source.

I have a prompt page with a tree prompt that allows users to select multiple values and displays results via a list report (using a parameter called ?treeprompt?). This works ok.

I am trying to create a page break to section the report by each of the values selected from the tree prompt.

1)   Within my query I have created a new data item that references the parameter ?treeprompt?
2)   I have created a page set and defined the following
a.   Query to reference, same query as ?treeprompt?
b.   Grouping & Sorting property, dragged parameter data item from my query into the 'Detailed Sort List'.
When I run the report no page break occurs. Can anyone offer any suggestions why this is the case?
If I drag the data item referencing the parameter onto the list the values selected in the tree prompt are displayed as follows: 'valueselected1, valueselected2'.

Many thanks in advance.
Chris

CognosPaul

The first thing to check is the master/detail relationship on the objects inside the detail page.  I've had some problems with it in the past. It seems only the caption of the item is passed, not the actual MUN itself.

I was planning a longer reply, but I'm being pressed for time now. Below is a copy of a report on the sales and marketing cube that I've just quickly built. I've to build something similar to what it sounds like you're doing. Load it into report studio and play with it a bit

<report xmlns="http://developer.cognos.com/schemas/report/6.0/" expressionLocale="he">
<modelPath>/content/package[@name='Sales and Marketing']/model[@name='model']</modelPath>
<drillBehavior modelBasedDrillThru="true"/>

<layouts>
<layout>
<reportPages>

<pageSet name="Page Set1" refQuery="PageSet Query">
<detailPages><page name="Page1"><style><defaultStyles><defaultStyle refStyle="pg"/></defaultStyles></style>
<pageBody><style><defaultStyles><defaultStyle refStyle="pb"/></defaultStyles></style>
<contents>


<textItem><dataSource><dataItemValue refDataItem="Time"/></dataSource></textItem><list horizontalPagination="true" refQuery="Query1" name="List1">



<style>
<CSS value="border-collapse:collapse"/>
<defaultStyles>
<defaultStyle refStyle="ls"/>
</defaultStyles>
</style>
<listColumns><listColumn><listColumnTitle><style><defaultStyles><defaultStyle refStyle="lt"/></defaultStyles></style><contents><textItem><dataSource><dataItemLabel refDataItem="ChildrenOfSelectedPeriod"/></dataSource></textItem></contents></listColumnTitle><listColumnBody><style><defaultStyles><defaultStyle refStyle="lm"/></defaultStyles></style><contents><textItem><dataSource><dataItemValue refDataItem="ChildrenOfSelectedPeriod"/></dataSource></textItem></contents></listColumnBody></listColumn><listColumn><listColumnTitle><style><defaultStyles><defaultStyle refStyle="lt"/></defaultStyles></style><contents><textItem><dataSource><dataItemLabel refDataItem="Revenue"/></dataSource></textItem></contents></listColumnTitle><listColumnBody><style><defaultStyles><defaultStyle refStyle="lc"/></defaultStyles></style><contents><textItem><dataSource><dataItemValue refDataItem="Revenue"/></dataSource></textItem></contents></listColumnBody></listColumn></listColumns><masterDetailLinks><masterDetailLink><masterContext><dataItemContext refDataItem="mun"/></masterContext><detailContext><parameterContext parameter="Period"/></detailContext></masterDetailLink></masterDetailLinks></list></contents>
</pageBody>


</page></detailPages>
<propertyList><propertyItem refDataItem="Time"/><propertyItem refDataItem="mun"/></propertyList></pageSet></reportPages>
<promptPages><page name="Prompt Page1">

<pageBody>
<contents><selectWithTree parameter="Time" refQuery="Time" multiSelect="true"><selectWithTreeItem refDataItem="Year"/></selectWithTree></contents>
<style>
<defaultStyles>
<defaultStyle refStyle="py"/>
</defaultStyles>
</style>
</pageBody>
<pageFooter>
<contents>



<promptButton type="finish">
<contents/>
<style>
<defaultStyles>
<defaultStyle refStyle="bp"/>
</defaultStyles>
</style>
</promptButton>
</contents>
<style>
<defaultStyles>
<defaultStyle refStyle="fp"/>
</defaultStyles>
</style>
</pageFooter>
<style>
<defaultStyles>
<defaultStyle refStyle="pp"/>
</defaultStyles>
</style>
</page></promptPages></layout>
</layouts>
<XMLAttributes><XMLAttribute name="RS_CreateExtendedDataItems" value="true" output="no"/><XMLAttribute name="listSeparator" value="," output="no"/></XMLAttributes><queries><query name="Time"><source><model/></source><selection><dataItem name="Year" aggregate="none"><expression>[sales_and_marketing.mdc].[Time].[Time].[Year]</expression></dataItem></selection></query><query name="PageSet Query"><source><model/></source><selection autoSummary="false"><dataItem name="Time" aggregate="none" rollupAggregate="none"><expression>#promptmany('Time','memberuniquename','','set(','',')')#</expression></dataItem><dataItem name="mun"><expression>roleValue('_memberUniqueName',[Time])</expression></dataItem></selection></query><query name="Query1"><source><model/></source><selection><dataItem name="ChildrenOfSelectedPeriod"><expression>#prompt('Period','token','[sales_and_marketing.mdc].[Time].[Time].[Time]-&gt;:[PC].[@MEMBER].[Time]','children(','',')')#</expression></dataItem><dataItemMeasure name="Revenue"><dmMember><MUN>[sales_and_marketing.mdc].[Measures].[Revenue]</MUN><itemCaption>Revenue</itemCaption></dmMember><dmDimension><DUN>[sales_and_marketing.mdc].[Measures]</DUN><itemCaption>Measures</itemCaption></dmDimension></dataItemMeasure></selection></query></queries></report>