Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Cascading prompts ReportNet

Status
Not open for further replies.

dudden

IS-IT--Management
Oct 21, 2005
9
SE
I am facing a problem with cascading prompts here comes the problem/what I want:
1. Prompt for a Date interval
2. Prompt for Area (multiple choice) this one should not be connected to the prompt Date, so these two are on the same page
3. New page: Prompt for Central or Local (multiple choice) should be filtered by prompt2
4. New page. Prompt for MarketChannel (multiple choice). Should be filtered by prompt2 and prompt3
5. New page. Prompt for Campaigns (multiple choice). Should be filtered by prompt 2, 3 and 4.

Is the right way to do it by: Mark the prompt and in the properties pane click Cascade Source and choose the prompt before, eg Prompt Campaigns --> Cascade source= Parameter MarketChannel?

When I do this I cant seem to get the right alternatives for every promptdialog. Seems like I miss something because that the alternatives I would like to see is not always there and som alternatives that should not be there are there.

Hope for YOUR help please it is urgent.
BR
Dudden
 
have you set prompts 2 3 and 4 to autosubmit=yes ?

Gary Parker
MIS Data Analyst
Manchester, England
 
You should copy the filters from your primary query into the appropriate queries populating the prompts.

Remember to filter the queries populating prompt 3, 4 and 5. Basically the cascading property is a property between two prompts - not the entire report.

The query for prompt 1 doesn’t contains any filter
The query for prompt 2 doesn’t contains any filter
The query for prompt 3 should be filtered by the parameter selected in prompt 2
The query for prompt 4 should be filtered by the parameter selected in prompt 2, 3
The query for prompt 5 should be filtered by the parameter selected in prompt 2, 3 and 4

Here is an example I created on the Great Outdoors (I assume you are using ReportNet 1.1). The query populating the Staff prompt needs to filtered by the value(s) selected in the Sales territory prompt – otherwise the report might come out with no data.

Regards,

Søren
Code:
<report xml:lang="en" xmlns="[URL unfurl="true"]http://developer.cognos.com/schemas/report/1/"><!--RS:1.1-->[/URL]
	<modelConnection name="/content/package[@name='GO Sales and Retailers']/model[@name='model']"/>
	<querySet xml:lang="en">
		<BIQuery name="Query1">
			<cube><factList><item refItem="Gross profit" aggregate="none"/><item refItem="Staff name" aggregate="none"/><item refItem="Sales territory" aggregate="none"/><item refItem="Retailer type" aggregate="none"/></factList></cube>
		<tabularModel><dataItem name="Gross profit" aggregate="total"><expression>[gosales_goretailers].[Orders].[Gross profit]</expression></dataItem><dataItem name="Staff name" aggregate="none"><expression>[gosales_goretailers].[Sales reps].[Staff name]</expression></dataItem><dataItem name="Sales territory" aggregate="none"><expression>[gosales_goretailers].[Countries].[Sales territory]</expression></dataItem><dataItem name="Retailer type" aggregate="none"><expression>[gosales_goretailers].[Retailers].[Retailer type]</expression></dataItem><filter><condition>[gosales_goretailers].[Countries].[Sales territory] in ?Sales territory?</condition></filter><filter><condition>[gosales_goretailers].[Retailers].[Retailer type] in ?Retailer type?</condition></filter><filter><condition>[gosales_goretailers].[Sales reps].[Staff name] in ?Staff name?</condition></filter></tabularModel></BIQuery>
	<BIQuery name="Sales territory"><cube><factList><item refItem="Sales territory" isHeader="true"/></factList></cube><tabularModel><dataItem name="Sales territory" aggregate="none"><expression>[gosales_goretailers].[Countries].[Sales territory]</expression></dataItem></tabularModel></BIQuery><BIQuery name="Retailer type"><cube><factList><item refItem="Retailer type" isHeader="true"/></factList></cube><tabularModel><dataItem name="Retailer type" aggregate="none"><expression>[gosales_goretailers].[Retailers].[Retailer type]</expression></dataItem></tabularModel></BIQuery><BIQuery name="Staff name"><cube><factList><item refItem="Staff name" isHeader="true"/></factList></cube><tabularModel><dataItem name="Staff name" aggregate="none"><expression>[gosales_goretailers].[Sales reps].[Staff name]</expression></dataItem><filter><condition>[gosales_goretailers].[Countries].[Sales territory] in ?Sales territory?</condition></filter></tabularModel></BIQuery></querySet>
	<layoutList>
		<layout>
			
		<promptPageList><page name="Prompt Page1">
					<pageHeader>
						<block class="reportTitle">
							<textItem class="reportTitleText">
								<text/>
							</textItem>
						</block>
						<style>
							<CSS value="padding-bottom:10px"/>
						</style>
					</pageHeader>
					<pageBody>
						<style>
							<CSS value="padding:12px"/>
						</style>
						<block><textItem><text>Sales territory</text></textItem></block><block><style><CSS value="margin-bottom:12px"/></style><selectValue refQuery="Sales territory" selectUI="listBox" parameter="Sales territory" multiSelect="true"><useItem refItem="Sales territory"/></selectValue></block><block><textItem><text>Retailer type</text></textItem></block><block><style><CSS value="margin-bottom:12px"/></style><selectValue refQuery="Retailer type" selectUI="listBox" parameter="Retailer type" multiSelect="true" cascadeOn="Sales territory"><useItem refItem="Retailer type"/></selectValue></block><block><textItem><text>Staff name</text></textItem></block><block><style><CSS value="margin-bottom:12px"/></style><selectValue refQuery="Staff name" selectUI="listBox" parameter="Staff name" multiSelect="true" cascadeOn="Retailer type"><useItem refItem="Staff name"/></selectValue></block></pageBody>
					<pageFooter>
						<style>
							<CSS value="padding:12px;border-top:1pt solid #999999"/>
						</style>
						<promptButton type="cancel">
							<style>
								<CSS value="margin-right:7px"/>
							</style>
						</promptButton>
						<promptButton type="back">
							<style>
								<CSS value="margin-right:7px"/>
							</style>
						</promptButton>
						<promptButton type="reprompt"/>
						<promptButton type="next">
							<style>
								<CSS value="margin-right:7px"/>
							</style>
						</promptButton>
						<promptButton type="finish"/>
					</pageFooter>
				</page>
			</promptPageList><pageSet>
				
			<page name="Page1">
					<pageBody>
						<list refQuery="Query1">
							<listColumnTitles><listColumnTitle><textItem><queryItemRef refItem="Sales territory" content="label"/></textItem></listColumnTitle><listColumnTitle><textItem><queryItemRef refItem="Retailer type" content="label"/></textItem></listColumnTitle><listColumnTitle><textItem><queryItemRef refItem="Staff name" content="label"/></textItem></listColumnTitle><listColumnTitle><textItem><queryItemRef refItem="Gross profit" content="label"/></textItem></listColumnTitle></listColumnTitles>
							<listColumns><listColumn><textItem><queryItemRef refItem="Sales territory"/></textItem></listColumn><listColumn><textItem><queryItemRef refItem="Retailer type"/></textItem></listColumn><listColumn><textItem><queryItemRef refItem="Staff name"/></textItem></listColumn><listColumn><textItem><queryItemRef refItem="Gross profit"/></textItem><style><CSS value="text-align:right"/></style></listColumn></listColumns>
							<style>
								<CSS value="border-collapse:collapse"/>
							</style>
						<XMLAttribute name="RS_ListGroupInfo" value=""/></list>
					</pageBody>
					<pageHeader>
						<block class="reportTitle">
							<textItem class="reportTitleText">
								<text/>
							</textItem>
						</block>
						<style>
							<CSS value="padding-bottom:10px"/>
						</style>
					</pageHeader>
					<pageFooter>
						<table>
							<tableRow>
								<tableCell>
									<textItem>
										<expression>AsOfDate()</expression>
									</textItem>
									<style>
										<CSS value="vertical-align:top;text-align:left;width:25%"/>
									</style>
								</tableCell>
								<tableCell>
									<textItem>
										<text>- </text>
									</textItem>
									<textItem>
										<expression>PageNumber()</expression>
									</textItem>
									<textItem>
										<text> -</text>
									</textItem>
									<style>
										<CSS value="vertical-align:top;text-align:center;width:50%"/>
									</style>
								</tableCell>
								<tableCell>
									<textItem>
										<expression>AsOfTime()</expression>
									</textItem>
									<style>
										<CSS value="vertical-align:top;text-align:right;width:25%"/>
									</style>
								</tableCell>
							</tableRow>
							<style>
								<CSS value="border-collapse:collapse;width:100%"/>
							</style>
						</table>
						<style>
							<CSS value="padding-top:10px"/>
						</style>
					</pageFooter>
				</page></pageSet></layout>
	</layoutList>
</report>
 
Thank you for your help, it is working just fine after the query filters. Thanks again.
BR Dudden
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top