Cognos report output, avoid reload on prompt selection
Requirement:
1. When click on auto submit prompt entire report should not loaded again.
<report xmlns="http://developer.cognos.com/schemas/report/11.0/" useStyleVersion="10" expressionLocale="en-us">
<modelPath>/content/folder[@name='Samples']/folder[@name='Models']/package[@name='GO Sales (analysis)']/model[@name='model']</modelPath>
<layouts>
<layout>
<reportPages>
<page name="Page1"><style><defaultStyles><defaultStyle refStyle="pg"/></defaultStyles></style>
<pageBody><style><defaultStyles><defaultStyle refStyle="pb"/></defaultStyles></style>
<contents>
<selectValue parameter="Parameter1" refQuery="Query1" multiSelect="false" selectValueUI="radioGroup" autoSubmit="true" required="false"><useItem refDataItem="Retailer type code"><displayItem refDataItem="Retailer type code"/></useItem><defaultSelections><defaultSimpleSelection>1</defaultSimpleSelection></defaultSelections><style><CSS value="height:200px"/></style></selectValue><selectValue parameter="Parameter2" refQuery="Query3" multiSelect="true" selectValueUI="checkboxGroup" required="false" cascadeOn="Parameter1"><useItem refDataItem="Retailer code"><displayItem refDataItem="Retailer code"/></useItem><style><CSS value="height:200px"/></style></selectValue><selectWithSearch parameter="Parameter3" refQuery="Query4" multiSelect="true" required="true"><useItem refDataItem="Product number"><displayItem refDataItem="Product details"/></useItem></selectWithSearch><table><style><defaultStyles><defaultStyle refStyle="tb"/></defaultStyles><CSS value="border-collapse:collapse"/></style><tableRows><tableRow><tableCells><tableCell><contents/></tableCell><tableCell><contents><HTMLItem description="Finish div">
<dataSource>
<staticValue><div id='finishButton'></staticValue>
</dataSource>
</HTMLItem><promptButton type="finish" name="Finish Button1">
<contents/>
<style>
<defaultStyles>
<defaultStyle refStyle="bp"/>
</defaultStyles>
<CSS value="margin:5px 5px 5px 10px;background-color:#60B815;font-weight:bold;color:white"/></style>
</promptButton><HTMLItem description="finish div end">
<dataSource>
<staticValue></div></staticValue>
</dataSource>
</HTMLItem><textBox name="click_holder_prompt" required="false" parameter="p_sns_click"><defaultSelections><defaultSimpleSelection>1</defaultSimpleSelection></defaultSelections><style><CSS value="visibility:hidden"/></style></textBox><HTMLItem name="Show_Hide Default Hide" description="Show/Hide(Default Hide) and stop refresh">
<dataSource>
<staticValue><script type="text/javascript" language="javascript">
var fW = (typeof getFormWarpRequest == "function" ? getFormWarpRequest() : document.forms["formWarpRequest"]);
var oCR = cognos.Report.getReport("_THIS_");
var click_holder_prompt= oCR.prompt.getControlByName("click_holder_prompt");
document.getElementById('finishButton').getElementsByTagName('button')[0].onclick=function(){
//alert('test');
var Value = [{'use': '1'}]
click_holder_prompt.setValues(Value);
promptAction('finish');
};
fW._textEditBoxclick_holder_prompt.value='000';
</Script>
</staticValue>
</dataSource>
</HTMLItem></contents></tableCell></tableCells></tableRow></tableRows></table><v2_combinationChart maxHotspots="10000" name="Combination Chart1" refQuery="Query2">
<v2_combinationTypeTooltips/>
<v2_legend>
<v2_legendPosition>
<v2_legendPreset/>
</v2_legendPosition>
<v2_legendTitle refQuery="Query2">
<v2_chartTextContents>
<v2_automaticText/>
</v2_chartTextContents>
<style>
<defaultStyles>
<defaultStyle refStyle="lx"/>
</defaultStyles>
</style>
</v2_legendTitle>
<style>
<defaultStyles>
<defaultStyle refStyle="lg"/>
</defaultStyles>
</style>
</v2_legend>
<v2_commonAxis>
<v2_ordinalAxis>
<v2_axisTitle refQuery="Query2">
<v2_chartTextContents>
<v2_automaticText/>
</v2_chartTextContents>
<style>
<defaultStyles>
<defaultStyle refStyle="at"/>
</defaultStyles>
</style>
</v2_axisTitle>
<v2_axisLine lineWeight="0"/>
<v2_axisLabels>
<style>
<defaultStyles>
<defaultStyle refStyle="al"/>
</defaultStyles>
</style>
</v2_axisLabels>
</v2_ordinalAxis>
<chartNodes><chartNode><chartNodeMembers><chartNodeMember refDataItem="Products"><chartContents><chartTextItem><dataSource><memberCaption/></dataSource></chartTextItem></chartContents></chartNodeMember></chartNodeMembers></chartNode></chartNodes></v2_commonAxis>
<v2_topLeftAxis>
<v2_combinationChartTypes>
<v2_bar borders="show">
<v2_solidPalette>
<v2_solidPaletteEntries>
<v2_solidPaletteEntry>
<v2_fillEffect defaultColor="#8599D3">
<v2_linearGradient gradientAngle="0">
<v2_gradientColor colorPosition="0" gradientColor="#8599D3"/>
<v2_gradientColor colorPosition="100" gradientColor="#5876AE"/>
</v2_linearGradient>
</v2_fillEffect>
</v2_solidPaletteEntry>
<v2_solidPaletteEntry>
<v2_fillEffect defaultColor="#E3AE6C">
<v2_linearGradient gradientAngle="0">
<v2_gradientColor colorPosition="0" gradientColor="#E3AE6C"/>
<v2_gradientColor colorPosition="100" gradientColor="#CD854E"/>
</v2_linearGradient>
</v2_fillEffect>
</v2_solidPaletteEntry>
<v2_solidPaletteEntry>
<v2_fillEffect defaultColor="#839862">
<v2_linearGradient gradientAngle="0">
<v2_gradientColor colorPosition="0" gradientColor="#839862"/>
<v2_gradientColor colorPosition="100" gradientColor="#6C7F56"/>
</v2_linearGradient>
</v2_fillEffect>
</v2_solidPaletteEntry>
<v2_solidPaletteEntry>
<v2_fillEffect defaultColor="#B7C873">
<v2_linearGradient gradientAngle="0">
<v2_gradientColor colorPosition="0" gradientColor="#B7C873"/>
<v2_gradientColor colorPosition="100" gradientColor="#AFB885"/>
</v2_linearGradient>
</v2_fillEffect>
</v2_solidPaletteEntry>
<v2_solidPaletteEntry>
<v2_fillEffect defaultColor="#8484A8">
<v2_linearGradient gradientAngle="0">
<v2_gradientColor colorPosition="0" gradientColor="#8484A8"/>
<v2_gradientColor colorPosition="100" gradientColor="#525E7E"/>
</v2_linearGradient>
</v2_fillEffect>
</v2_solidPaletteEntry>
<v2_solidPaletteEntry>
<v2_fillEffect defaultColor="#C0CCED">
<v2_linearGradient gradientAngle="0">
<v2_gradientColor colorPosition="0" gradientColor="#C0CCED"/>
<v2_gradientColor colorPosition="100" gradientColor="#B0C2E5"/>
</v2_linearGradient>
</v2_fillEffect>
</v2_solidPaletteEntry>
<v2_solidPaletteEntry>
<v2_fillEffect defaultColor="#8C5580">
<v2_linearGradient gradientAngle="0">
<v2_gradientColor colorPosition="0" gradientColor="#8C5580"/>
<v2_gradientColor colorPosition="100" gradientColor="#794067"/>
</v2_linearGradient>
</v2_fillEffect>
</v2_solidPaletteEntry>
<v2_solidPaletteEntry>
<v2_fillEffect defaultColor="#C789BC">
<v2_linearGradient gradientAngle="0">
<v2_gradientColor colorPosition="0" gradientColor="#C789BC"/>
<v2_gradientColor colorPosition="100" gradientColor="#BB72BC"/>
</v2_linearGradient>
</v2_fillEffect>
</v2_solidPaletteEntry>
<v2_solidPaletteEntry>
<v2_fillEffect defaultColor="#D5BAEF">
<v2_linearGradient gradientAngle="0">
<v2_gradientColor colorPosition="0" gradientColor="#D5BAEF"/>
<v2_gradientColor colorPosition="100" gradientColor="#C29FD1"/>
</v2_linearGradient>
</v2_fillEffect>
</v2_solidPaletteEntry>
<v2_solidPaletteEntry>
<v2_fillEffect defaultColor="#83683F">
<v2_linearGradient gradientAngle="0">
<v2_gradientColor colorPosition="0" gradientColor="#83683F"/>
<v2_gradientColor colorPosition="100" gradientColor="#604926"/>
</v2_linearGradient>
</v2_fillEffect>
</v2_solidPaletteEntry>
<v2_solidPaletteEntry>
<v2_fillEffect defaultColor="#DCB05A">
<v2_linearGradient gradientAngle="0">
<v2_gradientColor colorPosition="0" gradientColor="#DCB05A"/>
<v2_gradientColor colorPosition="100" gradientColor="#C09C52"/>
</v2_linearGradient>
</v2_fillEffect>
</v2_solidPaletteEntry>
<v2_solidPaletteEntry>
<v2_fillEffect defaultColor="#F4DF9E">
<v2_linearGradient gradientAngle="0">
<v2_gradientColor colorPosition="0" gradientColor="#F4DF9E"/>
<v2_gradientColor colorPosition="100" gradientColor="#E4CF87"/>
</v2_linearGradient>
</v2_fillEffect>
</v2_solidPaletteEntry>
<v2_solidPaletteEntry>
<v2_fillEffect defaultColor="#5F8A8C">
<v2_linearGradient gradientAngle="0">
<v2_gradientColor colorPosition="0" gradientColor="#5F8A8C"/>
<v2_gradientColor colorPosition="100" gradientColor="#537579"/>
</v2_linearGradient>
</v2_fillEffect>
</v2_solidPaletteEntry>
<v2_solidPaletteEntry>
<v2_fillEffect defaultColor="#96C4B2">
<v2_linearGradient gradientAngle="0">
<v2_gradientColor colorPosition="0" gradientColor="#96C4B2"/>
<v2_gradientColor colorPosition="100" gradientColor="#89B0A0"/>
</v2_linearGradient>
</v2_fillEffect>
</v2_solidPaletteEntry>
<v2_solidPaletteEntry>
<v2_fillEffect defaultColor="#CBE8E7">
<v2_linearGradient gradientAngle="0">
<v2_gradientColor colorPosition="0" gradientColor="#CBE8E7"/>
<v2_gradientColor colorPosition="100" gradientColor="#BDD6D5"/>
</v2_linearGradient>
</v2_fillEffect>
</v2_solidPaletteEntry>
<v2_solidPaletteEntry>
<v2_fillEffect defaultColor="#AE6564">
<v2_linearGradient gradientAngle="0">
<v2_gradientColor colorPosition="0" gradientColor="#AE6564"/>
<v2_gradientColor colorPosition="100" gradientColor="#875352"/>
</v2_linearGradient>
</v2_fillEffect>
</v2_solidPaletteEntry>
<v2_solidPaletteEntry>
<v2_fillEffect defaultColor="#D88C6F">
<v2_linearGradient gradientAngle="0">
<v2_gradientColor colorPosition="0" gradientColor="#D88C6F"/>
<v2_gradientColor colorPosition="100" gradientColor="#C47D61"/>
</v2_linearGradient>
</v2_fillEffect>
</v2_solidPaletteEntry>
<v2_solidPaletteEntry>
<v2_fillEffect defaultColor="#E3C9B0">
<v2_linearGradient gradientAngle="0">
<v2_gradientColor colorPosition="0" gradientColor="#E3C9B0"/>
<v2_gradientColor colorPosition="100" gradientColor="#D2B2A5"/>
</v2_linearGradient>
</v2_fillEffect>
</v2_solidPaletteEntry>
<v2_solidPaletteEntry>
<v2_fillEffect defaultColor="#848484">
<v2_linearGradient gradientAngle="0">
<v2_gradientColor colorPosition="0" gradientColor="#848484"/>
<v2_gradientColor colorPosition="100" gradientColor="#555555"/>
</v2_linearGradient>
</v2_fillEffect>
</v2_solidPaletteEntry>
<v2_solidPaletteEntry>
<v2_fillEffect defaultColor="#a4a4a4">
<v2_linearGradient gradientAngle="0">
<v2_gradientColor colorPosition="0" gradientColor="#a4a4a4"/>
<v2_gradientColor colorPosition="100" gradientColor="#909090"/>
</v2_linearGradient>
</v2_fillEffect>
</v2_solidPaletteEntry>
<v2_solidPaletteEntry>
<v2_fillEffect defaultColor="#C7C7C7">
<v2_linearGradient gradientAngle="0">
<v2_gradientColor colorPosition="0" gradientColor="#C7C7C7"/>
<v2_gradientColor colorPosition="100" gradientColor="#c1c1c1"/>
</v2_linearGradient>
</v2_fillEffect>
</v2_solidPaletteEntry>
</v2_solidPaletteEntries>
</v2_solidPalette>
<!-- v2_solidPaletteRef ref="gDefaultSolid"/ -->
<chartNodes><chartNode><chartNodeMembers><chartNodeMember refDataItem="Retailer (by type)"><chartContents><chartTextItem><dataSource><memberCaption/></dataSource></chartTextItem></chartContents></chartNodeMember></chartNodeMembers></chartNode></chartNodes></v2_bar>
</v2_combinationChartTypes>
<v2_axis>
<v2_axisTitle refQuery="Query2">
<v2_chartTextContents>
<v2_automaticText/>
</v2_chartTextContents>
<style>
<defaultStyles>
<defaultStyle refStyle="at"/>
</defaultStyles>
</style>
</v2_axisTitle>
<v2_axisLine lineWeight="0"/>
<v2_axisRange>
<v2_automaticRange/>
</v2_axisRange>
<v2_axisLabels>
<style>
<defaultStyles>
<defaultStyle refStyle="al"/>
</defaultStyles>
</style>
</v2_axisLabels>
<v2_majorGridlines lineWeight="0" lineColor="#CCCCCC"/>
<v2_majorBackgroundColors>
<v2_firstBackgroundColor color="#D2D2D2" transparency="50"/>
<v2_secondBackgroundColor color="#E2E2E2" transparency="50"/>
</v2_majorBackgroundColors>
</v2_axis>
</v2_topLeftAxis>
<style>
<defaultStyles>
<defaultStyle refStyle="ch"/>
</defaultStyles>
</style>
<noDataHandler>
<contents>
<block>
<contents>
<textItem>
<dataSource>
<staticValue>No Data Available</staticValue>
</dataSource>
<style>
<CSS value="padding:10px 18px;"/>
</style>
</textItem>
</contents>
</block>
</contents>
</noDataHandler>
<v2_defaultChartMeasure refDataItem="Revenue"/><conditionalRender refVariable="finish_click"><renderFor refVariableValue="1"/></conditionalRender></v2_combinationChart>
<crosstab horizontalPagination="true" name="Crosstab1" refQuery="Query2">
<crosstabCorner>
<contents><textItem><dataSource><dataItemLabel refDataItem="Revenue"/></dataSource></textItem></contents>
<style>
<defaultStyles>
<defaultStyle refStyle="xm"/>
</defaultStyles>
</style>
</crosstabCorner>
<noDataHandler>
<contents>
<block>
<contents>
<textItem>
<dataSource>
<staticValue>No Data Available</staticValue>
</dataSource>
<style>
<CSS value="padding:10px 18px;"/>
</style>
</textItem>
</contents>
</block>
</contents>
</noDataHandler>
<style>
<CSS value="border-collapse:collapse"/>
<defaultStyles>
<defaultStyle refStyle="xt"/>
</defaultStyles>
</style>
<crosstabColumns><crosstabNode><crosstabNodeMembers><crosstabNodeMember refDataItem="Retailer (by type)" edgeLocation="e1"><style><defaultStyles><defaultStyle refStyle="ml"/></defaultStyles></style><contents><textItem><dataSource><memberCaption/></dataSource></textItem></contents></crosstabNodeMember></crosstabNodeMembers></crosstabNode></crosstabColumns><crosstabRows><crosstabNode><crosstabNodeMembers><crosstabNodeMember refDataItem="Products" edgeLocation="e2"><style><defaultStyles><defaultStyle refStyle="ml"/></defaultStyles></style><contents><textItem><dataSource><memberCaption/></dataSource></textItem></contents></crosstabNodeMember></crosstabNodeMembers></crosstabNode></crosstabRows><defaultMeasure refDataItem="Revenue"/><crosstabFactCell><contents><textItem><dataSource><cellValue/></dataSource></textItem></contents><style><defaultStyles><defaultStyle refStyle="mv"/></defaultStyles></style></crosstabFactCell><conditionalRender refVariable="finish_click"><renderFor refVariableValue="1"/></conditionalRender></crosstab></contents>
</pageBody>
<pageHeader>
<contents>
<block><style><defaultStyles><defaultStyle refStyle="ta"/></defaultStyles></style>
<contents>
<textItem><style><defaultStyles><defaultStyle refStyle="tt"/></defaultStyles></style>
<dataSource>
<staticValue/>
</dataSource>
</textItem>
</contents>
</block>
</contents>
<style>
<defaultStyles>
<defaultStyle refStyle="ph"/>
</defaultStyles>
<CSS value="padding-bottom:10px"/>
</style>
</pageHeader>
<pageFooter>
<contents>
<table>
<tableRows>
<tableRow>
<tableCells>
<tableCell>
<contents>
<date>
<style>
<dataFormat>
<dateFormat/>
</dataFormat>
</style>
</date>
</contents>
<style>
<CSS value="vertical-align:top;text-align:left;width:25%"/>
</style>
</tableCell>
<tableCell>
<contents>
<pageNumber/>
</contents>
<style>
<CSS value="vertical-align:top;text-align:center;width:50%"/>
</style>
</tableCell>
<tableCell>
<contents>
<time>
<style>
<dataFormat>
<timeFormat/>
</dataFormat>
</style>
</time>
</contents>
<style>
<CSS value="vertical-align:top;text-align:right;width:25%"/>
</style>
</tableCell>
</tableCells>
</tableRow>
</tableRows>
<style>
<defaultStyles>
<defaultStyle refStyle="tb"/>
</defaultStyles>
<CSS value="border-collapse:collapse;width:100%"/>
</style>
</table>
</contents>
<style>
<defaultStyles>
<defaultStyle refStyle="pf"/>
</defaultStyles>
<CSS value="padding-top:10px"/>
</style>
</pageFooter>
</page>
</reportPages>
</layout>
</layouts>
<XMLAttributes><XMLAttribute name="RS_CreateExtendedDataItems" value="true" output="no"/><XMLAttribute name="listSeparator" value="," output="no"/><XMLAttribute name="RS_modelModificationTime" value="2014-07-11T23:06:07.065Z" output="no"/></XMLAttributes><queries><query name="Query2"><source><model/></source><selection><dataItemHierarchySet rootMembersOnly="true" name="Retailer (by type)"><dmDimension><DUN>[Sales (analysis)].[Retailer type]</DUN><itemCaption>Retailer type</itemCaption></dmDimension><dmHierarchy><HUN>[Sales (analysis)].[Retailer type].[Retailer (by type)]</HUN><itemCaption>Retailer (by type)</itemCaption></dmHierarchy></dataItemHierarchySet><dataItemHierarchySet rootMembersOnly="true" name="Products"><dmDimension><DUN>[Sales (analysis)].[Products]</DUN><itemCaption>Products</itemCaption></dmDimension><dmHierarchy><HUN>[Sales (analysis)].[Products].[Products]</HUN><itemCaption>Products</itemCaption></dmHierarchy></dataItemHierarchySet><dataItemMeasure name="Revenue"><dmMember><MUN>[Sales (analysis)].[Sales].[Revenue]</MUN><itemCaption>Revenue</itemCaption></dmMember><dmDimension><DUN>[Sales (analysis)].[Sales]</DUN><itemCaption>Sales</itemCaption></dmDimension><XMLAttributes><XMLAttribute name="RS_dataType" value="2" output="no"/></XMLAttributes></dataItemMeasure></selection><detailFilters><detailFilter use="optional"><filterExpression>[Sales (analysis)].[Retailer type].[Retailer (by type)].[Retailer type].[Retailer type code]= ?Parameter1?</filterExpression></detailFilter><detailFilter use="optional"><filterExpression>[Sales (analysis)].[Retailer type].[Retailer (by type)].[Retailer].[Retailer code] in ?Parameter2?</filterExpression></detailFilter><detailFilter use="optional"><filterExpression>[Sales (analysis)].[Products].[Products].[Product details].[Product number] in (?Parameter3?)</filterExpression></detailFilter></detailFilters></query><query name="Query1"><source><model/></source><selection><dataItem name="Retailer type code" aggregate="none"><expression>[Sales (analysis)].[Retailer type].[Retailer (by type)].[Retailer type].[Retailer type code]</expression></dataItem><dataItem name="Retailer type code1" aggregate="none" sort="ascending"><expression>[Sales (analysis)].[Retailer type].[Retailer (by type)].[Retailer type].[Retailer type code]</expression></dataItem></selection></query><query name="Query3"><source><model/></source><selection><dataItem name="Retailer code" aggregate="none"><expression>[Sales (analysis)].[Retailer type].[Retailer (by type)].[Retailer].[Retailer code]</expression></dataItem><dataItem name="Retailer name (multiscript)" aggregate="none" sort="ascending"><expression>[Sales (analysis)].[Retailer type].[Retailer (by type)].[Retailer].[Retailer name (multiscript)]</expression></dataItem><dataItemMemberProperty name="Retailer type code"><dmMemberProperty><MPUN>[Sales (analysis)].[Retailer type].[Retailer (by type)].[Retailer type].[Retailer type code]</MPUN><itemCaption>Retailer type code</itemCaption></dmMemberProperty><dmDimension><DUN>[Sales (analysis)].[Retailer type]</DUN><itemCaption>Retailer type</itemCaption></dmDimension><dmHierarchy><HUN>[Sales (analysis)].[Retailer type].[Retailer (by type)]</HUN><itemCaption>Retailer (by type)</itemCaption></dmHierarchy><dmLevel><LUN>[Sales (analysis)].[Retailer type].[Retailer (by type)].[Retailer type]</LUN><itemCaption>Retailer type</itemCaption></dmLevel></dataItemMemberProperty></selection><detailFilters><detailFilter use="prohibited"><filterExpression>[Retailer type code]=?Parameter1?</filterExpression></detailFilter></detailFilters></query><query name="Query4"><source><model/></source><selection><dataItemLevelSet name="Product details"><dmLevel><LUN>[Sales (analysis)].[Products].[Products].[Product details]</LUN><itemCaption>Product details</itemCaption></dmLevel><dmDimension><DUN>[Sales (analysis)].[Products]</DUN><itemCaption>Products</itemCaption></dmDimension><dmHierarchy><HUN>[Sales (analysis)].[Products].[Products]</HUN><itemCaption>Products</itemCaption></dmHierarchy></dataItemLevelSet><dataItemMemberProperty name="Product number"><dmMemberProperty><MPUN>[Sales (analysis)].[Products].[Products].[Product details].[Product number]</MPUN><itemCaption>Product number</itemCaption></dmMemberProperty><dmDimension><DUN>[Sales (analysis)].[Products]</DUN><itemCaption>Products</itemCaption></dmDimension><dmHierarchy><HUN>[Sales (analysis)].[Products].[Products]</HUN><itemCaption>Products</itemCaption></dmHierarchy><dmLevel><LUN>[Sales (analysis)].[Products].[Products].[Product details]</LUN><itemCaption>Product details</itemCaption></dmLevel></dataItemMemberProperty></selection></query></queries><reportName>Auto submit</reportName><reportVariables><reportVariable type="boolean" name="finish_click">
<reportExpression>ParamValue('p_sns_click')='1'</reportExpression>
<variableValues>
<variableValue value="1"/>
</variableValues>
</reportVariable></reportVariables><drillBehavior drillUpDown="true" modelBasedDrillThru="true"/></report>
Requirement:
1. When click on auto submit prompt entire report should not loaded again.
2. When click on search button in search and select prompt entire report should not loaded again.
3. Display report only on initial load and when click on finish button.
Solution:
Overview,
We will create a parameter with a default value and change its value on finish button click and report output will display only on the value changed by finish button.
Step1. Create a hidden prompt with default value '1' and assign a parameter.
Prameter name =p_sns_click
Step2: create Boolean variable.
ParamValue('p_sns_click')='1'
Step 3: Assign this variable in render variable property of report output(List, cross tab, chart, table etc.) .
Step 4: create a finish button and put a HTML item in left to start div, put two html item at right to end div and write Java script.
In first html item
<div id='finishButton'>
In second html item
</div>
In third html item
<script type="text/javascript" language="javascript">
var fW = (typeof getFormWarpRequest == "function" ? getFormWarpRequest() : document.forms["formWarpRequest"]);
var oCR = cognos.Report.getReport("_THIS_");
var click_holder_prompt= oCR.prompt.getControlByName("click_holder_prompt");
document.getElementById('finishButton').getElementsByTagName('button')[0].onclick=function(){
//alert('test');
var Value = [{'use': '1'}]
click_holder_prompt.setValues(Value);
promptAction('finish');
};
fW._textEditBoxclick_holder_prompt.value='000';
</Script>
Complete report xml on 10.2.1
<report xmlns="http://developer.cognos.com/schemas/report/11.0/" useStyleVersion="10" expressionLocale="en-us">
<modelPath>/content/folder[@name='Samples']/folder[@name='Models']/package[@name='GO Sales (analysis)']/model[@name='model']</modelPath>
<layouts>
<layout>
<reportPages>
<page name="Page1"><style><defaultStyles><defaultStyle refStyle="pg"/></defaultStyles></style>
<pageBody><style><defaultStyles><defaultStyle refStyle="pb"/></defaultStyles></style>
<contents>
<selectValue parameter="Parameter1" refQuery="Query1" multiSelect="false" selectValueUI="radioGroup" autoSubmit="true" required="false"><useItem refDataItem="Retailer type code"><displayItem refDataItem="Retailer type code"/></useItem><defaultSelections><defaultSimpleSelection>1</defaultSimpleSelection></defaultSelections><style><CSS value="height:200px"/></style></selectValue><selectValue parameter="Parameter2" refQuery="Query3" multiSelect="true" selectValueUI="checkboxGroup" required="false" cascadeOn="Parameter1"><useItem refDataItem="Retailer code"><displayItem refDataItem="Retailer code"/></useItem><style><CSS value="height:200px"/></style></selectValue><selectWithSearch parameter="Parameter3" refQuery="Query4" multiSelect="true" required="true"><useItem refDataItem="Product number"><displayItem refDataItem="Product details"/></useItem></selectWithSearch><table><style><defaultStyles><defaultStyle refStyle="tb"/></defaultStyles><CSS value="border-collapse:collapse"/></style><tableRows><tableRow><tableCells><tableCell><contents/></tableCell><tableCell><contents><HTMLItem description="Finish div">
<dataSource>
<staticValue><div id='finishButton'></staticValue>
</dataSource>
</HTMLItem><promptButton type="finish" name="Finish Button1">
<contents/>
<style>
<defaultStyles>
<defaultStyle refStyle="bp"/>
</defaultStyles>
<CSS value="margin:5px 5px 5px 10px;background-color:#60B815;font-weight:bold;color:white"/></style>
</promptButton><HTMLItem description="finish div end">
<dataSource>
<staticValue></div></staticValue>
</dataSource>
</HTMLItem><textBox name="click_holder_prompt" required="false" parameter="p_sns_click"><defaultSelections><defaultSimpleSelection>1</defaultSimpleSelection></defaultSelections><style><CSS value="visibility:hidden"/></style></textBox><HTMLItem name="Show_Hide Default Hide" description="Show/Hide(Default Hide) and stop refresh">
<dataSource>
<staticValue><script type="text/javascript" language="javascript">
var fW = (typeof getFormWarpRequest == "function" ? getFormWarpRequest() : document.forms["formWarpRequest"]);
var oCR = cognos.Report.getReport("_THIS_");
var click_holder_prompt= oCR.prompt.getControlByName("click_holder_prompt");
document.getElementById('finishButton').getElementsByTagName('button')[0].onclick=function(){
//alert('test');
var Value = [{'use': '1'}]
click_holder_prompt.setValues(Value);
promptAction('finish');
};
fW._textEditBoxclick_holder_prompt.value='000';
</Script>
</staticValue>
</dataSource>
</HTMLItem></contents></tableCell></tableCells></tableRow></tableRows></table><v2_combinationChart maxHotspots="10000" name="Combination Chart1" refQuery="Query2">
<v2_combinationTypeTooltips/>
<v2_legend>
<v2_legendPosition>
<v2_legendPreset/>
</v2_legendPosition>
<v2_legendTitle refQuery="Query2">
<v2_chartTextContents>
<v2_automaticText/>
</v2_chartTextContents>
<style>
<defaultStyles>
<defaultStyle refStyle="lx"/>
</defaultStyles>
</style>
</v2_legendTitle>
<style>
<defaultStyles>
<defaultStyle refStyle="lg"/>
</defaultStyles>
</style>
</v2_legend>
<v2_commonAxis>
<v2_ordinalAxis>
<v2_axisTitle refQuery="Query2">
<v2_chartTextContents>
<v2_automaticText/>
</v2_chartTextContents>
<style>
<defaultStyles>
<defaultStyle refStyle="at"/>
</defaultStyles>
</style>
</v2_axisTitle>
<v2_axisLine lineWeight="0"/>
<v2_axisLabels>
<style>
<defaultStyles>
<defaultStyle refStyle="al"/>
</defaultStyles>
</style>
</v2_axisLabels>
</v2_ordinalAxis>
<chartNodes><chartNode><chartNodeMembers><chartNodeMember refDataItem="Products"><chartContents><chartTextItem><dataSource><memberCaption/></dataSource></chartTextItem></chartContents></chartNodeMember></chartNodeMembers></chartNode></chartNodes></v2_commonAxis>
<v2_topLeftAxis>
<v2_combinationChartTypes>
<v2_bar borders="show">
<v2_solidPalette>
<v2_solidPaletteEntries>
<v2_solidPaletteEntry>
<v2_fillEffect defaultColor="#8599D3">
<v2_linearGradient gradientAngle="0">
<v2_gradientColor colorPosition="0" gradientColor="#8599D3"/>
<v2_gradientColor colorPosition="100" gradientColor="#5876AE"/>
</v2_linearGradient>
</v2_fillEffect>
</v2_solidPaletteEntry>
<v2_solidPaletteEntry>
<v2_fillEffect defaultColor="#E3AE6C">
<v2_linearGradient gradientAngle="0">
<v2_gradientColor colorPosition="0" gradientColor="#E3AE6C"/>
<v2_gradientColor colorPosition="100" gradientColor="#CD854E"/>
</v2_linearGradient>
</v2_fillEffect>
</v2_solidPaletteEntry>
<v2_solidPaletteEntry>
<v2_fillEffect defaultColor="#839862">
<v2_linearGradient gradientAngle="0">
<v2_gradientColor colorPosition="0" gradientColor="#839862"/>
<v2_gradientColor colorPosition="100" gradientColor="#6C7F56"/>
</v2_linearGradient>
</v2_fillEffect>
</v2_solidPaletteEntry>
<v2_solidPaletteEntry>
<v2_fillEffect defaultColor="#B7C873">
<v2_linearGradient gradientAngle="0">
<v2_gradientColor colorPosition="0" gradientColor="#B7C873"/>
<v2_gradientColor colorPosition="100" gradientColor="#AFB885"/>
</v2_linearGradient>
</v2_fillEffect>
</v2_solidPaletteEntry>
<v2_solidPaletteEntry>
<v2_fillEffect defaultColor="#8484A8">
<v2_linearGradient gradientAngle="0">
<v2_gradientColor colorPosition="0" gradientColor="#8484A8"/>
<v2_gradientColor colorPosition="100" gradientColor="#525E7E"/>
</v2_linearGradient>
</v2_fillEffect>
</v2_solidPaletteEntry>
<v2_solidPaletteEntry>
<v2_fillEffect defaultColor="#C0CCED">
<v2_linearGradient gradientAngle="0">
<v2_gradientColor colorPosition="0" gradientColor="#C0CCED"/>
<v2_gradientColor colorPosition="100" gradientColor="#B0C2E5"/>
</v2_linearGradient>
</v2_fillEffect>
</v2_solidPaletteEntry>
<v2_solidPaletteEntry>
<v2_fillEffect defaultColor="#8C5580">
<v2_linearGradient gradientAngle="0">
<v2_gradientColor colorPosition="0" gradientColor="#8C5580"/>
<v2_gradientColor colorPosition="100" gradientColor="#794067"/>
</v2_linearGradient>
</v2_fillEffect>
</v2_solidPaletteEntry>
<v2_solidPaletteEntry>
<v2_fillEffect defaultColor="#C789BC">
<v2_linearGradient gradientAngle="0">
<v2_gradientColor colorPosition="0" gradientColor="#C789BC"/>
<v2_gradientColor colorPosition="100" gradientColor="#BB72BC"/>
</v2_linearGradient>
</v2_fillEffect>
</v2_solidPaletteEntry>
<v2_solidPaletteEntry>
<v2_fillEffect defaultColor="#D5BAEF">
<v2_linearGradient gradientAngle="0">
<v2_gradientColor colorPosition="0" gradientColor="#D5BAEF"/>
<v2_gradientColor colorPosition="100" gradientColor="#C29FD1"/>
</v2_linearGradient>
</v2_fillEffect>
</v2_solidPaletteEntry>
<v2_solidPaletteEntry>
<v2_fillEffect defaultColor="#83683F">
<v2_linearGradient gradientAngle="0">
<v2_gradientColor colorPosition="0" gradientColor="#83683F"/>
<v2_gradientColor colorPosition="100" gradientColor="#604926"/>
</v2_linearGradient>
</v2_fillEffect>
</v2_solidPaletteEntry>
<v2_solidPaletteEntry>
<v2_fillEffect defaultColor="#DCB05A">
<v2_linearGradient gradientAngle="0">
<v2_gradientColor colorPosition="0" gradientColor="#DCB05A"/>
<v2_gradientColor colorPosition="100" gradientColor="#C09C52"/>
</v2_linearGradient>
</v2_fillEffect>
</v2_solidPaletteEntry>
<v2_solidPaletteEntry>
<v2_fillEffect defaultColor="#F4DF9E">
<v2_linearGradient gradientAngle="0">
<v2_gradientColor colorPosition="0" gradientColor="#F4DF9E"/>
<v2_gradientColor colorPosition="100" gradientColor="#E4CF87"/>
</v2_linearGradient>
</v2_fillEffect>
</v2_solidPaletteEntry>
<v2_solidPaletteEntry>
<v2_fillEffect defaultColor="#5F8A8C">
<v2_linearGradient gradientAngle="0">
<v2_gradientColor colorPosition="0" gradientColor="#5F8A8C"/>
<v2_gradientColor colorPosition="100" gradientColor="#537579"/>
</v2_linearGradient>
</v2_fillEffect>
</v2_solidPaletteEntry>
<v2_solidPaletteEntry>
<v2_fillEffect defaultColor="#96C4B2">
<v2_linearGradient gradientAngle="0">
<v2_gradientColor colorPosition="0" gradientColor="#96C4B2"/>
<v2_gradientColor colorPosition="100" gradientColor="#89B0A0"/>
</v2_linearGradient>
</v2_fillEffect>
</v2_solidPaletteEntry>
<v2_solidPaletteEntry>
<v2_fillEffect defaultColor="#CBE8E7">
<v2_linearGradient gradientAngle="0">
<v2_gradientColor colorPosition="0" gradientColor="#CBE8E7"/>
<v2_gradientColor colorPosition="100" gradientColor="#BDD6D5"/>
</v2_linearGradient>
</v2_fillEffect>
</v2_solidPaletteEntry>
<v2_solidPaletteEntry>
<v2_fillEffect defaultColor="#AE6564">
<v2_linearGradient gradientAngle="0">
<v2_gradientColor colorPosition="0" gradientColor="#AE6564"/>
<v2_gradientColor colorPosition="100" gradientColor="#875352"/>
</v2_linearGradient>
</v2_fillEffect>
</v2_solidPaletteEntry>
<v2_solidPaletteEntry>
<v2_fillEffect defaultColor="#D88C6F">
<v2_linearGradient gradientAngle="0">
<v2_gradientColor colorPosition="0" gradientColor="#D88C6F"/>
<v2_gradientColor colorPosition="100" gradientColor="#C47D61"/>
</v2_linearGradient>
</v2_fillEffect>
</v2_solidPaletteEntry>
<v2_solidPaletteEntry>
<v2_fillEffect defaultColor="#E3C9B0">
<v2_linearGradient gradientAngle="0">
<v2_gradientColor colorPosition="0" gradientColor="#E3C9B0"/>
<v2_gradientColor colorPosition="100" gradientColor="#D2B2A5"/>
</v2_linearGradient>
</v2_fillEffect>
</v2_solidPaletteEntry>
<v2_solidPaletteEntry>
<v2_fillEffect defaultColor="#848484">
<v2_linearGradient gradientAngle="0">
<v2_gradientColor colorPosition="0" gradientColor="#848484"/>
<v2_gradientColor colorPosition="100" gradientColor="#555555"/>
</v2_linearGradient>
</v2_fillEffect>
</v2_solidPaletteEntry>
<v2_solidPaletteEntry>
<v2_fillEffect defaultColor="#a4a4a4">
<v2_linearGradient gradientAngle="0">
<v2_gradientColor colorPosition="0" gradientColor="#a4a4a4"/>
<v2_gradientColor colorPosition="100" gradientColor="#909090"/>
</v2_linearGradient>
</v2_fillEffect>
</v2_solidPaletteEntry>
<v2_solidPaletteEntry>
<v2_fillEffect defaultColor="#C7C7C7">
<v2_linearGradient gradientAngle="0">
<v2_gradientColor colorPosition="0" gradientColor="#C7C7C7"/>
<v2_gradientColor colorPosition="100" gradientColor="#c1c1c1"/>
</v2_linearGradient>
</v2_fillEffect>
</v2_solidPaletteEntry>
</v2_solidPaletteEntries>
</v2_solidPalette>
<!-- v2_solidPaletteRef ref="gDefaultSolid"/ -->
<chartNodes><chartNode><chartNodeMembers><chartNodeMember refDataItem="Retailer (by type)"><chartContents><chartTextItem><dataSource><memberCaption/></dataSource></chartTextItem></chartContents></chartNodeMember></chartNodeMembers></chartNode></chartNodes></v2_bar>
</v2_combinationChartTypes>
<v2_axis>
<v2_axisTitle refQuery="Query2">
<v2_chartTextContents>
<v2_automaticText/>
</v2_chartTextContents>
<style>
<defaultStyles>
<defaultStyle refStyle="at"/>
</defaultStyles>
</style>
</v2_axisTitle>
<v2_axisLine lineWeight="0"/>
<v2_axisRange>
<v2_automaticRange/>
</v2_axisRange>
<v2_axisLabels>
<style>
<defaultStyles>
<defaultStyle refStyle="al"/>
</defaultStyles>
</style>
</v2_axisLabels>
<v2_majorGridlines lineWeight="0" lineColor="#CCCCCC"/>
<v2_majorBackgroundColors>
<v2_firstBackgroundColor color="#D2D2D2" transparency="50"/>
<v2_secondBackgroundColor color="#E2E2E2" transparency="50"/>
</v2_majorBackgroundColors>
</v2_axis>
</v2_topLeftAxis>
<style>
<defaultStyles>
<defaultStyle refStyle="ch"/>
</defaultStyles>
</style>
<noDataHandler>
<contents>
<block>
<contents>
<textItem>
<dataSource>
<staticValue>No Data Available</staticValue>
</dataSource>
<style>
<CSS value="padding:10px 18px;"/>
</style>
</textItem>
</contents>
</block>
</contents>
</noDataHandler>
<v2_defaultChartMeasure refDataItem="Revenue"/><conditionalRender refVariable="finish_click"><renderFor refVariableValue="1"/></conditionalRender></v2_combinationChart>
<crosstab horizontalPagination="true" name="Crosstab1" refQuery="Query2">
<crosstabCorner>
<contents><textItem><dataSource><dataItemLabel refDataItem="Revenue"/></dataSource></textItem></contents>
<style>
<defaultStyles>
<defaultStyle refStyle="xm"/>
</defaultStyles>
</style>
</crosstabCorner>
<noDataHandler>
<contents>
<block>
<contents>
<textItem>
<dataSource>
<staticValue>No Data Available</staticValue>
</dataSource>
<style>
<CSS value="padding:10px 18px;"/>
</style>
</textItem>
</contents>
</block>
</contents>
</noDataHandler>
<style>
<CSS value="border-collapse:collapse"/>
<defaultStyles>
<defaultStyle refStyle="xt"/>
</defaultStyles>
</style>
<crosstabColumns><crosstabNode><crosstabNodeMembers><crosstabNodeMember refDataItem="Retailer (by type)" edgeLocation="e1"><style><defaultStyles><defaultStyle refStyle="ml"/></defaultStyles></style><contents><textItem><dataSource><memberCaption/></dataSource></textItem></contents></crosstabNodeMember></crosstabNodeMembers></crosstabNode></crosstabColumns><crosstabRows><crosstabNode><crosstabNodeMembers><crosstabNodeMember refDataItem="Products" edgeLocation="e2"><style><defaultStyles><defaultStyle refStyle="ml"/></defaultStyles></style><contents><textItem><dataSource><memberCaption/></dataSource></textItem></contents></crosstabNodeMember></crosstabNodeMembers></crosstabNode></crosstabRows><defaultMeasure refDataItem="Revenue"/><crosstabFactCell><contents><textItem><dataSource><cellValue/></dataSource></textItem></contents><style><defaultStyles><defaultStyle refStyle="mv"/></defaultStyles></style></crosstabFactCell><conditionalRender refVariable="finish_click"><renderFor refVariableValue="1"/></conditionalRender></crosstab></contents>
</pageBody>
<pageHeader>
<contents>
<block><style><defaultStyles><defaultStyle refStyle="ta"/></defaultStyles></style>
<contents>
<textItem><style><defaultStyles><defaultStyle refStyle="tt"/></defaultStyles></style>
<dataSource>
<staticValue/>
</dataSource>
</textItem>
</contents>
</block>
</contents>
<style>
<defaultStyles>
<defaultStyle refStyle="ph"/>
</defaultStyles>
<CSS value="padding-bottom:10px"/>
</style>
</pageHeader>
<pageFooter>
<contents>
<table>
<tableRows>
<tableRow>
<tableCells>
<tableCell>
<contents>
<date>
<style>
<dataFormat>
<dateFormat/>
</dataFormat>
</style>
</date>
</contents>
<style>
<CSS value="vertical-align:top;text-align:left;width:25%"/>
</style>
</tableCell>
<tableCell>
<contents>
<pageNumber/>
</contents>
<style>
<CSS value="vertical-align:top;text-align:center;width:50%"/>
</style>
</tableCell>
<tableCell>
<contents>
<time>
<style>
<dataFormat>
<timeFormat/>
</dataFormat>
</style>
</time>
</contents>
<style>
<CSS value="vertical-align:top;text-align:right;width:25%"/>
</style>
</tableCell>
</tableCells>
</tableRow>
</tableRows>
<style>
<defaultStyles>
<defaultStyle refStyle="tb"/>
</defaultStyles>
<CSS value="border-collapse:collapse;width:100%"/>
</style>
</table>
</contents>
<style>
<defaultStyles>
<defaultStyle refStyle="pf"/>
</defaultStyles>
<CSS value="padding-top:10px"/>
</style>
</pageFooter>
</page>
</reportPages>
</layout>
</layouts>
<XMLAttributes><XMLAttribute name="RS_CreateExtendedDataItems" value="true" output="no"/><XMLAttribute name="listSeparator" value="," output="no"/><XMLAttribute name="RS_modelModificationTime" value="2014-07-11T23:06:07.065Z" output="no"/></XMLAttributes><queries><query name="Query2"><source><model/></source><selection><dataItemHierarchySet rootMembersOnly="true" name="Retailer (by type)"><dmDimension><DUN>[Sales (analysis)].[Retailer type]</DUN><itemCaption>Retailer type</itemCaption></dmDimension><dmHierarchy><HUN>[Sales (analysis)].[Retailer type].[Retailer (by type)]</HUN><itemCaption>Retailer (by type)</itemCaption></dmHierarchy></dataItemHierarchySet><dataItemHierarchySet rootMembersOnly="true" name="Products"><dmDimension><DUN>[Sales (analysis)].[Products]</DUN><itemCaption>Products</itemCaption></dmDimension><dmHierarchy><HUN>[Sales (analysis)].[Products].[Products]</HUN><itemCaption>Products</itemCaption></dmHierarchy></dataItemHierarchySet><dataItemMeasure name="Revenue"><dmMember><MUN>[Sales (analysis)].[Sales].[Revenue]</MUN><itemCaption>Revenue</itemCaption></dmMember><dmDimension><DUN>[Sales (analysis)].[Sales]</DUN><itemCaption>Sales</itemCaption></dmDimension><XMLAttributes><XMLAttribute name="RS_dataType" value="2" output="no"/></XMLAttributes></dataItemMeasure></selection><detailFilters><detailFilter use="optional"><filterExpression>[Sales (analysis)].[Retailer type].[Retailer (by type)].[Retailer type].[Retailer type code]= ?Parameter1?</filterExpression></detailFilter><detailFilter use="optional"><filterExpression>[Sales (analysis)].[Retailer type].[Retailer (by type)].[Retailer].[Retailer code] in ?Parameter2?</filterExpression></detailFilter><detailFilter use="optional"><filterExpression>[Sales (analysis)].[Products].[Products].[Product details].[Product number] in (?Parameter3?)</filterExpression></detailFilter></detailFilters></query><query name="Query1"><source><model/></source><selection><dataItem name="Retailer type code" aggregate="none"><expression>[Sales (analysis)].[Retailer type].[Retailer (by type)].[Retailer type].[Retailer type code]</expression></dataItem><dataItem name="Retailer type code1" aggregate="none" sort="ascending"><expression>[Sales (analysis)].[Retailer type].[Retailer (by type)].[Retailer type].[Retailer type code]</expression></dataItem></selection></query><query name="Query3"><source><model/></source><selection><dataItem name="Retailer code" aggregate="none"><expression>[Sales (analysis)].[Retailer type].[Retailer (by type)].[Retailer].[Retailer code]</expression></dataItem><dataItem name="Retailer name (multiscript)" aggregate="none" sort="ascending"><expression>[Sales (analysis)].[Retailer type].[Retailer (by type)].[Retailer].[Retailer name (multiscript)]</expression></dataItem><dataItemMemberProperty name="Retailer type code"><dmMemberProperty><MPUN>[Sales (analysis)].[Retailer type].[Retailer (by type)].[Retailer type].[Retailer type code]</MPUN><itemCaption>Retailer type code</itemCaption></dmMemberProperty><dmDimension><DUN>[Sales (analysis)].[Retailer type]</DUN><itemCaption>Retailer type</itemCaption></dmDimension><dmHierarchy><HUN>[Sales (analysis)].[Retailer type].[Retailer (by type)]</HUN><itemCaption>Retailer (by type)</itemCaption></dmHierarchy><dmLevel><LUN>[Sales (analysis)].[Retailer type].[Retailer (by type)].[Retailer type]</LUN><itemCaption>Retailer type</itemCaption></dmLevel></dataItemMemberProperty></selection><detailFilters><detailFilter use="prohibited"><filterExpression>[Retailer type code]=?Parameter1?</filterExpression></detailFilter></detailFilters></query><query name="Query4"><source><model/></source><selection><dataItemLevelSet name="Product details"><dmLevel><LUN>[Sales (analysis)].[Products].[Products].[Product details]</LUN><itemCaption>Product details</itemCaption></dmLevel><dmDimension><DUN>[Sales (analysis)].[Products]</DUN><itemCaption>Products</itemCaption></dmDimension><dmHierarchy><HUN>[Sales (analysis)].[Products].[Products]</HUN><itemCaption>Products</itemCaption></dmHierarchy></dataItemLevelSet><dataItemMemberProperty name="Product number"><dmMemberProperty><MPUN>[Sales (analysis)].[Products].[Products].[Product details].[Product number]</MPUN><itemCaption>Product number</itemCaption></dmMemberProperty><dmDimension><DUN>[Sales (analysis)].[Products]</DUN><itemCaption>Products</itemCaption></dmDimension><dmHierarchy><HUN>[Sales (analysis)].[Products].[Products]</HUN><itemCaption>Products</itemCaption></dmHierarchy><dmLevel><LUN>[Sales (analysis)].[Products].[Products].[Product details]</LUN><itemCaption>Product details</itemCaption></dmLevel></dataItemMemberProperty></selection></query></queries><reportName>Auto submit</reportName><reportVariables><reportVariable type="boolean" name="finish_click">
<reportExpression>ParamValue('p_sns_click')='1'</reportExpression>
<variableValues>
<variableValue value="1"/>
</variableValues>
</reportVariable></reportVariables><drillBehavior drillUpDown="true" modelBasedDrillThru="true"/></report>