<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Paul&#039;s Cognos Blog</title>
	<atom:link href="http://cognospaul.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://cognospaul.wordpress.com</link>
	<description>Cognos, Cognos, Cognos!</description>
	<lastBuildDate>Mon, 20 May 2013 18:23:45 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='cognospaul.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>Paul&#039;s Cognos Blog</title>
		<link>http://cognospaul.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://cognospaul.wordpress.com/osd.xml" title="Paul&#039;s Cognos Blog" />
	<atom:link rel='hub' href='http://cognospaul.wordpress.com/?pushpress=hub'/>
		<item>
		<title>Checkbox List Prompts revisited</title>
		<link>http://cognospaul.wordpress.com/2013/05/16/checkbox-list-prompts-revisited/</link>
		<comments>http://cognospaul.wordpress.com/2013/05/16/checkbox-list-prompts-revisited/#comments</comments>
		<pubDate>Thu, 16 May 2013 07:56:44 +0000</pubDate>
		<dc:creator>CognosPaul</dc:creator>
				<category><![CDATA[Javascript]]></category>
		<category><![CDATA[Prompts]]></category>
		<category><![CDATA[checkbox]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[js]]></category>
		<category><![CDATA[list]]></category>
		<category><![CDATA[prompt]]></category>

		<guid isPermaLink="false">http://cognospaul.wordpress.com/?p=392</guid>
		<description><![CDATA[A long while back, I published an article detailing how to use a list to interact with a checkbox prompt. Since then, several people have asked me to add features to the code, and to fix some bugs. I&#8217;ve also learned quite a bit since I wrote that, so I&#8217;ve rewritten a parts of it. [&#8230;]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=cognospaul.wordpress.com&#038;blog=15829318&#038;post=392&#038;subd=cognospaul&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>A long while back, I published an <a href="http://cognospaul.wordpress.com/2011/03/01/checkbox-list-prompt/" target="_blank">article</a> detailing how to use a list to interact with a checkbox prompt. Since then, several people have asked me to add features to the code, and to fix some bugs. I&#8217;ve also learned quite a bit since I wrote that, so I&#8217;ve rewritten a parts of it.</p>
<p>The basic core of the code is the same. Using div tags to identify the list and prompt objects, with more HTML items to build the actual checkbox in the list. This is by no means optimized JavaScript, nor is it using the 10.2 Prompt API. </p>
<p>Previously the code would only work with one list. The reference to the list was hardcoded in the script and the checkboxes and select all buttons would fail for the second list. Also requested, using grouped rows. For instance, a user might want to select all of the months in 2011 by checking on the checkbox in the 2011 group. Another thing I fixed was the way it would loop through value prompts to find the correct value. If the key had any special characters, it wouldn&#8217;t be able to find it. Cognos would automatically escape those special characters.</p>
<p>The XML below was written on 10.2, but will downgrade easily to 10.1 by changing</p>
<pre class="brush: plain; title: ; notranslate">xmlns=&quot;http://developer.cognos.com/schemas/report/9.0/&quot;</pre>
<p> to
<pre class="brush: plain; title: ; notranslate">xmlns=&quot;http://developer.cognos.com/schemas/report/8.0/&quot;</pre>
<p>The JavaScript will work in 8.4 as well, but downgrading will be a bit more difficult &#8211; you need to use /report/6.0/ and remove all of the version 10 only XML elements. If there&#8217;s a demand for it, I&#8217;ll go through and post all of the different JavaScript objects here. (But there shouldn&#8217;t be, because 10.2 is the greatest things since 10.1.1 and you should all upgrade and IBM should be paying me push upgrades like this.)</p>
<pre class="brush: xml; collapse: true; light: false; title: ; toolbar: true; notranslate">
&lt;report xmlns=&quot;http://developer.cognos.com/schemas/report/9.0/&quot; expressionLocale=&quot;he&quot; interactivePageBreakByFrame=&quot;true&quot;&gt;
    &lt;modelPath&gt;/content/folder[@name='Samples']/folder[@name='Cubes']/package[@name='Sales and Marketing (cube)']/model[@name='2008-07-25T15:28:38.072Z']&lt;/modelPath&gt; 
    &lt;layouts&gt; 
        &lt;layout&gt; 
            &lt;reportPages&gt; 
                &lt;page name=&quot;Page1&quot;&gt; 
                    &lt;pageBody&gt; 
                        &lt;contents&gt;&lt;HTMLItem description=&quot;Styles&quot;&gt; 
                                &lt;dataSource&gt; 
                                    &lt;staticValue&gt;&amp;lt;style type=&quot;text/css&quot;&amp;gt; 
  
input.updatebutton 
{ 
   font-size:11px; 
   font-weight:bold; 
   width:140px; 
   height:27px; 
   color:#000000; 
   background-color:#cdc9c9; 
   border-style:solid; 
   border-color:#003377; 
   border-width:3px; 
} 
  
  
  
input.matchbutton 
{ 
   font-size:11px; 
   font-weight:bold; 
   width:140px; 
   height:27px; 
   color:#EEFFFF; 
   background-color:#0088DD; 
   border-style:solid; 
   border-color:#003377; 
   border-width:3px; 
} 
  
input.selectbutton 
{ 
   font-size:9px; 
   font-weight:bold; 
   width:60px; 
   height:20px; 
   color:#000000; 
   background-color:#FFFFFF; 
   border-style:solid; 
   border-color:#FFFFFF; 
   border-width:3px; 
} 
  
&amp;lt;/style&amp;gt; 
  
&amp;lt;script language=&quot;javascript&quot;&amp;gt; 
  
function goLite(FRM,BTN) 
{ 
   window.document.forms[FRM].elements[BTN].style.color = &quot;#FFFF99&quot;; 
   window.document.forms[FRM].elements[BTN].style.backgroundColor = &quot;#11AAEE&quot;; 
} 
  
function goDim(FRM,BTN) 
{ 
   window.document.forms[FRM].elements[BTN].style.color = &quot;#EEFFFF&quot;; 
   window.document.forms[FRM].elements[BTN].style.backgroundColor = &quot;#0088DD&quot;; 
} 
  
&amp;lt;/script&amp;gt; 
&lt;/staticValue&gt; 
                                &lt;/dataSource&gt; 
                            &lt;/HTMLItem&gt; 
                            &lt;HTMLItem description=&quot;Scripts&quot;&gt; 
                                &lt;dataSource&gt; 
                                    &lt;staticValue&gt;&amp;lt;script&amp;gt; 
function selectInCheckbox(cbGroup,id) 
{ 
   var inputs= document.getElementById(cbGroup).getElementsByTagName('input'); 
   for (var i=0;i&amp;lt;inputs.length;i++) 
   { 
        if (inputs[i].value == id)  
        { 
            inputs[i].click(); 
        } 
   } 
} 
  
function selectInCheckboxRow(cbGroup,id) 
{ 
    var inputs= document.getElementById(cbGroup).getElementsByTagName('input'); 
    inputs[id].click(); 
} 

function checkAll(list){ 
var inputs=document.getElementById(list).getElementsByTagName('input') 
for (var i=0;i&amp;lt;inputs.length;i++){ 
        if (inputs[i].type == 'checkbox') { 
            if (inputs[i].checked == true)  
        {} 
        else {inputs[i].click();} 
        } 
} 
}  
  
function unCheckAll(list){ 
var inputs=document.getElementById(list).getElementsByTagName('input') 
for (var i=0;i&amp;lt;inputs.length;i++){ 
        if (inputs[i].type == 'checkbox') { 
            if (inputs[i].checked == true)  
        {inputs[i].click();} 
        else {} 
        } 
} 
}  

function getSource (){
    var targ; 
    if (!e) var e = window.event; 
    if(!e) return false; 
    if (e.target) targ = e.target; 
    else if (e.srcElement) targ = e.srcElement; 
    if (targ.nodeType == 3) // defeat Safari bug 
      targ = targ.parentNode; 
    return targ; 
} 
  

function checkNested(){

var 
    elm = getSource().parentNode
  , tbody = elm.parentNode.parentNode.parentNode
  , rowsLength = tbody.rows.length
  , rowSpanLength = elm.rowSpan
  , rowIndex = elm.parentNode.rowIndex
  , isChecked = getSource().checked;

  for(var i=rowIndex;i&amp;lt;rowIndex+rowSpanLength;i++)
  {
     var e = i == rowIndex?elm.cellIndex + 1 : 0;
      if(tbody.rows[i].cells[e].getElementsByTagName('INPUT')[0].checked == isChecked) {continue;}
     else{  tbody.rows[i].cells[e].getElementsByTagName('INPUT')[0].click()}
      i = i+elm.nextSibling.rowSpan - 1;

  }
}
&amp;lt;/script&amp;gt; 
  
&lt;/staticValue&gt; 
                                &lt;/dataSource&gt; 
                            &lt;/HTMLItem&gt; 
                              
                              
                            &lt;promptButton type=&quot;reprompt&quot;&gt; 
            &lt;contents/&gt; 
            &lt;style&gt; 
                &lt;defaultStyles&gt; 
                    &lt;defaultStyle refStyle=&quot;bp&quot;/&gt; 
                &lt;/defaultStyles&gt; 
            &lt;/style&gt; 
        &lt;/promptButton&gt;&lt;table&gt;&lt;style&gt;&lt;defaultStyles&gt;&lt;defaultStyle refStyle=&quot;tb&quot;/&gt;&lt;/defaultStyles&gt;&lt;CSS value=&quot;border-collapse:collapse&quot;/&gt;&lt;/style&gt;&lt;tableRows&gt;&lt;tableRow&gt;&lt;tableCells&gt;&lt;tableCell&gt;&lt;contents&gt;&lt;HTMLItem description=&quot;div&quot;&gt; 
            &lt;dataSource&gt; 
                &lt;staticValue&gt;&amp;lt;div id=&quot;checkbox1&quot; &amp;gt;&lt;/staticValue&gt; 
            &lt;/dataSource&gt; 
        &lt;/HTMLItem&gt;&lt;selectValue multiSelect=&quot;true&quot; parameter=&quot;code&quot; range=&quot;false&quot; refQuery=&quot;Prompt&quot; required=&quot;false&quot; selectValueUI=&quot;checkboxGroup&quot;&gt;&lt;useItem refDataItem=&quot;Product line code&quot;/&gt;&lt;sortList&gt;&lt;sortItem refDataItem=&quot;Product line code&quot;/&gt;&lt;/sortList&gt;&lt;/selectValue&gt;&lt;HTMLItem description=&quot;/div&quot;&gt; 
            &lt;dataSource&gt; 
                &lt;staticValue&gt;&amp;lt;/div&amp;gt;&lt;/staticValue&gt; 
            &lt;/dataSource&gt; 
        &lt;/HTMLItem&gt;&lt;HTMLItem description=&quot;div&quot;&gt; 
            &lt;dataSource&gt; 
                &lt;staticValue&gt;&amp;lt;div id=&quot;checkbox2&quot; &amp;gt;&lt;/staticValue&gt; 
            &lt;/dataSource&gt; 
        &lt;/HTMLItem&gt;&lt;selectValue multiSelect=&quot;true&quot; parameter=&quot;Quarter&quot; refQuery=&quot;Quarters&quot; required=&quot;false&quot; selectValueUI=&quot;checkboxGroup&quot;&gt;&lt;useItem refDataItem=&quot;Quarter - Category Code&quot;&gt;&lt;displayItem refDataItem=&quot;Quarter&quot;/&gt;&lt;/useItem&gt;&lt;/selectValue&gt;&lt;HTMLItem description=&quot;/div&quot;&gt; 
            &lt;dataSource&gt; 
                &lt;staticValue&gt;&amp;lt;/div&amp;gt;&lt;/staticValue&gt; 
            &lt;/dataSource&gt; 
        &lt;/HTMLItem&gt;&lt;/contents&gt;&lt;style&gt;&lt;CSS value=&quot;vertical-align:top&quot;/&gt;&lt;/style&gt;&lt;/tableCell&gt;&lt;tableCell&gt;&lt;contents&gt;&lt;HTMLItem description=&quot;div id=&amp;quot;list1&amp;quot;&quot;&gt; 
                                                                &lt;dataSource&gt; 
                                                                    &lt;staticValue&gt;&amp;lt;div id=&quot;list1&quot;&amp;gt;&lt;/staticValue&gt; 
                                                                &lt;/dataSource&gt; 
                                                            &lt;/HTMLItem&gt;&lt;list name=&quot;List2&quot; pageBreakText=&quot;false&quot; refQuery=&quot;Prompt&quot; repeatEveryPage=&quot;true&quot;&gt; 
              
              
              
            &lt;style&gt; 
                &lt;CSS value=&quot;border-collapse:collapse&quot;/&gt; 
                &lt;defaultStyles&gt; 
                    &lt;defaultStyle refStyle=&quot;ls&quot;/&gt; 
                &lt;/defaultStyles&gt; 
            &lt;/style&gt; 
        &lt;listColumns&gt;&lt;listColumn&gt;&lt;listColumnTitle&gt;&lt;style&gt;&lt;defaultStyles&gt;&lt;defaultStyle refStyle=&quot;lt&quot;/&gt;&lt;/defaultStyles&gt;&lt;/style&gt;&lt;contents&gt;&lt;textItem&gt;&lt;dataSource&gt;&lt;staticValue&gt;HTML Item&lt;/staticValue&gt;&lt;/dataSource&gt;&lt;/textItem&gt;&lt;/contents&gt;&lt;/listColumnTitle&gt;&lt;listColumnBody&gt;&lt;style&gt;&lt;defaultStyles&gt;&lt;defaultStyle refStyle=&quot;lc&quot;/&gt;&lt;/defaultStyles&gt;&lt;/style&gt;&lt;contents&gt;&lt;HTMLItem description=&quot;Checkbox Start&quot;&gt; 
                                                                                    &lt;dataSource&gt; 
                                                                                        &lt;staticValue&gt;&amp;lt;input title=&quot;Faster but if the sorting is off then this won't work&quot; type=&quot;checkbox&quot;  
&lt;/staticValue&gt;&lt;/dataSource&gt; 
                                                                                &lt;/HTMLItem&gt;&lt;HTMLItem description=&quot;checked&quot;&gt; 
            &lt;dataSource&gt; 
                  
            &lt;reportExpression&gt;case when (ParamValue('code') +', ') contains ([Product line code] +', ') then (' checked ') else ('') end&lt;/reportExpression&gt;&lt;/dataSource&gt; 
        &lt;/HTMLItem&gt;&lt;HTMLItem description=&quot;onClick&quot;&gt; 
            &lt;dataSource&gt; 
                &lt;staticValue&gt;onClick=&quot;selectInCheckboxRow('checkbox1','&lt;/staticValue&gt; 
            &lt;/dataSource&gt; 
        &lt;/HTMLItem&gt;&lt;HTMLItem description=&quot;Row&quot;&gt; 
            &lt;dataSource&gt; 
                  
            &lt;reportExpression&gt;RowNumber ()&lt;/reportExpression&gt;&lt;/dataSource&gt; 
        &lt;/HTMLItem&gt;&lt;HTMLItem description=&quot;CheckboxEnd&quot;&gt; 
                                                                                    &lt;dataSource&gt; 
                                                                                        &lt;staticValue&gt;'); 
&quot;&amp;gt; 
&lt;/staticValue&gt; 
                                                                                    &lt;/dataSource&gt; 
                                                                                &lt;/HTMLItem&gt;&lt;/contents&gt;&lt;/listColumnBody&gt;&lt;/listColumn&gt;&lt;listColumn&gt;&lt;listColumnTitle&gt;&lt;style&gt;&lt;defaultStyles&gt;&lt;defaultStyle refStyle=&quot;lt&quot;/&gt;&lt;/defaultStyles&gt;&lt;/style&gt;&lt;contents&gt;&lt;textItem&gt;&lt;dataSource&gt;&lt;staticValue&gt;By Code&lt;/staticValue&gt;&lt;/dataSource&gt;&lt;/textItem&gt;&lt;/contents&gt;&lt;/listColumnTitle&gt;&lt;listColumnBody&gt;&lt;style&gt;&lt;defaultStyles&gt;&lt;defaultStyle refStyle=&quot;lc&quot;/&gt;&lt;/defaultStyles&gt;&lt;/style&gt;&lt;contents&gt;&lt;HTMLItem description=&quot;Checkbox Start&quot;&gt; 
                                                                                    &lt;dataSource&gt; 
                                                                                        &lt;staticValue&gt;&amp;lt;input title=&quot;Slower but less prone to error&quot; type=&quot;checkbox&quot;  
&lt;/staticValue&gt;&lt;/dataSource&gt; 
                                                                                &lt;/HTMLItem&gt;&lt;HTMLItem description=&quot;checked&quot;&gt; 
            &lt;dataSource&gt; 
                  
            &lt;reportExpression&gt;case when (ParamValue('code') +', ') contains ([Product line code] +', ') then (' checked ') else ('') end&lt;/reportExpression&gt;&lt;/dataSource&gt; 
        &lt;/HTMLItem&gt;&lt;HTMLItem description=&quot;onClick&quot;&gt; 
            &lt;dataSource&gt; 
                &lt;staticValue&gt;onClick=&quot;selectInCheckbox('checkbox1','&lt;/staticValue&gt; 
            &lt;/dataSource&gt; 
        &lt;/HTMLItem&gt;&lt;HTMLItem description=&quot;Code&quot;&gt; 
            &lt;dataSource&gt; 
                  
            &lt;dataItemValue refDataItem=&quot;Product line code&quot;/&gt;&lt;/dataSource&gt; 
        &lt;/HTMLItem&gt;&lt;HTMLItem description=&quot;CheckboxEnd&quot;&gt; 
                                                                                    &lt;dataSource&gt; 
                                                                                        &lt;staticValue&gt;'); 
&quot;&amp;gt; 
&lt;/staticValue&gt; 
                                                                                    &lt;/dataSource&gt; 
                                                                                &lt;/HTMLItem&gt;&lt;/contents&gt;&lt;/listColumnBody&gt;&lt;/listColumn&gt;&lt;listColumn&gt;&lt;listColumnTitle&gt;&lt;style&gt;&lt;defaultStyles&gt;&lt;defaultStyle refStyle=&quot;lt&quot;/&gt;&lt;/defaultStyles&gt;&lt;/style&gt;&lt;contents&gt;&lt;textItem&gt;&lt;dataSource&gt;&lt;dataItemLabel refDataItem=&quot;Product line&quot;/&gt;&lt;/dataSource&gt;&lt;/textItem&gt;&lt;/contents&gt;&lt;/listColumnTitle&gt;&lt;listColumnBody&gt;&lt;style&gt;&lt;defaultStyles&gt;&lt;defaultStyle refStyle=&quot;lc&quot;/&gt;&lt;/defaultStyles&gt;&lt;/style&gt;&lt;contents&gt;&lt;textItem&gt;&lt;dataSource&gt;&lt;dataItemValue refDataItem=&quot;Product line&quot;/&gt;&lt;/dataSource&gt;&lt;/textItem&gt;&lt;/contents&gt;&lt;/listColumnBody&gt;&lt;/listColumn&gt;&lt;listColumn&gt;&lt;listColumnTitle&gt;&lt;style&gt;&lt;defaultStyles&gt;&lt;defaultStyle refStyle=&quot;lt&quot;/&gt;&lt;/defaultStyles&gt;&lt;/style&gt;&lt;contents&gt;&lt;textItem&gt;&lt;dataSource&gt;&lt;dataItemLabel refDataItem=&quot;Quantity&quot;/&gt;&lt;/dataSource&gt;&lt;/textItem&gt;&lt;/contents&gt;&lt;/listColumnTitle&gt;&lt;listColumnBody&gt;&lt;style&gt;&lt;defaultStyles&gt;&lt;defaultStyle refStyle=&quot;lm&quot;/&gt;&lt;/defaultStyles&gt;&lt;/style&gt;&lt;contents&gt;&lt;textItem&gt;&lt;dataSource&gt;&lt;dataItemValue refDataItem=&quot;Quantity&quot;/&gt;&lt;/dataSource&gt;&lt;/textItem&gt;&lt;/contents&gt;&lt;/listColumnBody&gt;&lt;/listColumn&gt;&lt;listColumn&gt;&lt;listColumnTitle&gt;&lt;style&gt;&lt;defaultStyles&gt;&lt;defaultStyle refStyle=&quot;lt&quot;/&gt;&lt;/defaultStyles&gt;&lt;/style&gt;&lt;contents&gt;&lt;textItem&gt;&lt;dataSource&gt;&lt;dataItemLabel refDataItem=&quot;Revenue&quot;/&gt;&lt;/dataSource&gt;&lt;/textItem&gt;&lt;/contents&gt;&lt;/listColumnTitle&gt;&lt;listColumnBody&gt;&lt;style&gt;&lt;defaultStyles&gt;&lt;defaultStyle refStyle=&quot;lm&quot;/&gt;&lt;/defaultStyles&gt;&lt;/style&gt;&lt;contents&gt;&lt;textItem&gt;&lt;dataSource&gt;&lt;dataItemValue refDataItem=&quot;Revenue&quot;/&gt;&lt;/dataSource&gt;&lt;/textItem&gt;&lt;/contents&gt;&lt;/listColumnBody&gt;&lt;/listColumn&gt;&lt;listColumn&gt;&lt;listColumnTitle&gt;&lt;style&gt;&lt;defaultStyles&gt;&lt;defaultStyle refStyle=&quot;lt&quot;/&gt;&lt;/defaultStyles&gt;&lt;/style&gt;&lt;contents&gt;&lt;textItem&gt;&lt;dataSource&gt;&lt;dataItemLabel refDataItem=&quot;Gross profit&quot;/&gt;&lt;/dataSource&gt;&lt;/textItem&gt;&lt;/contents&gt;&lt;/listColumnTitle&gt;&lt;listColumnBody&gt;&lt;style&gt;&lt;defaultStyles&gt;&lt;defaultStyle refStyle=&quot;lm&quot;/&gt;&lt;/defaultStyles&gt;&lt;/style&gt;&lt;contents&gt;&lt;textItem&gt;&lt;dataSource&gt;&lt;dataItemValue refDataItem=&quot;Gross profit&quot;/&gt;&lt;/dataSource&gt;&lt;/textItem&gt;&lt;/contents&gt;&lt;/listColumnBody&gt;&lt;/listColumn&gt;&lt;/listColumns&gt;&lt;propertyList&gt;&lt;propertyItem refDataItem=&quot;Product line code&quot;/&gt;&lt;/propertyList&gt;&lt;sortList&gt;&lt;sortItem refDataItem=&quot;Product line code&quot;/&gt;&lt;/sortList&gt;&lt;/list&gt;&lt;HTMLItem description=&quot;/div&quot;&gt; 
                                                                &lt;dataSource&gt; 
                                                                    &lt;staticValue&gt;&amp;lt;/div&amp;gt;&lt;/staticValue&gt; 
                                                                &lt;/dataSource&gt; 
                                                            &lt;/HTMLItem&gt;&lt;HTMLItem description=&quot;doAll&quot;&gt; 
                                                        &lt;dataSource&gt; 
                                                            &lt;staticValue&gt; &amp;lt;input type=&quot;button&quot; value=&quot;Select All&quot; class=&quot;selectbutton&quot; onmouseover = &quot;this.style.cursor='hand'&quot; onclick=&quot;checkAll('list1');&quot;&amp;gt; 
&amp;lt;input type=&quot;button&quot; value=&quot;Clear All&quot; class=&quot;selectbutton&quot; onmouseover = &quot;this.style.cursor='hand'&quot; onclick=&quot;unCheckAll('list1');&quot;&amp;gt;&lt;/staticValue&gt; 
                                                        &lt;/dataSource&gt; 
                                                    &lt;/HTMLItem&gt;&lt;HTMLItem description=&quot;div id=&amp;quot;list2&amp;quot;&quot;&gt; 
                                                                &lt;dataSource&gt; 
                                                                    &lt;staticValue&gt;&amp;lt;div id=&quot;list2&quot;&amp;gt;&lt;/staticValue&gt; 
                                                                &lt;/dataSource&gt; 
                                                            &lt;/HTMLItem&gt;&lt;list horizontalPagination=&quot;true&quot; name=&quot;List1&quot; refQuery=&quot;Prompt&quot;&gt;
			
			
			
			&lt;noDataHandler&gt;
				&lt;contents&gt;
					&lt;block&gt;
						&lt;contents&gt;
							&lt;textItem&gt;
								&lt;dataSource&gt;
									&lt;staticValue&gt;No Data Available&lt;/staticValue&gt;
								&lt;/dataSource&gt;
								&lt;style&gt;
									&lt;CSS value=&quot;padding:10px 18px;&quot;/&gt;
								&lt;/style&gt;
							&lt;/textItem&gt;
						&lt;/contents&gt;
					&lt;/block&gt;
				&lt;/contents&gt;
			&lt;/noDataHandler&gt;
			&lt;style&gt;
				&lt;CSS value=&quot;border-collapse:collapse&quot;/&gt;
				&lt;defaultStyles&gt;
					&lt;defaultStyle refStyle=&quot;ls&quot;/&gt;
				&lt;/defaultStyles&gt;
			&lt;/style&gt;
		&lt;listColumns&gt;&lt;listColumn&gt;&lt;listColumnTitle&gt;&lt;style&gt;&lt;defaultStyles&gt;&lt;defaultStyle refStyle=&quot;lt&quot;/&gt;&lt;/defaultStyles&gt;&lt;/style&gt;&lt;contents&gt;&lt;textItem&gt;&lt;dataSource&gt;&lt;dataItemLabel refDataItem=&quot;Time&quot;/&gt;&lt;/dataSource&gt;&lt;/textItem&gt;&lt;/contents&gt;&lt;/listColumnTitle&gt;&lt;listColumnBody&gt;&lt;style&gt;&lt;defaultStyles&gt;&lt;defaultStyle refStyle=&quot;lc&quot;/&gt;&lt;/defaultStyles&gt;&lt;/style&gt;&lt;contents&gt;&lt;HTMLItem&gt;
			&lt;dataSource&gt;
				&lt;staticValue&gt;&amp;lt;input type=&quot;checkbox&quot; onclick=&quot;
checkNested()&quot;&amp;gt;&lt;/staticValue&gt;
			&lt;/dataSource&gt;
		&lt;/HTMLItem&gt;&lt;textItem&gt;&lt;dataSource&gt;&lt;dataItemValue refDataItem=&quot;Time&quot;/&gt;&lt;/dataSource&gt;&lt;/textItem&gt;&lt;/contents&gt;&lt;listColumnRowSpan refDataItem=&quot;Time&quot;/&gt;&lt;/listColumnBody&gt;&lt;/listColumn&gt;&lt;listColumn&gt;&lt;listColumnTitle&gt;&lt;style&gt;&lt;defaultStyles&gt;&lt;defaultStyle refStyle=&quot;lt&quot;/&gt;&lt;/defaultStyles&gt;&lt;/style&gt;&lt;contents&gt;&lt;textItem&gt;&lt;dataSource&gt;&lt;dataItemLabel refDataItem=&quot;Year&quot;/&gt;&lt;/dataSource&gt;&lt;/textItem&gt;&lt;/contents&gt;&lt;/listColumnTitle&gt;&lt;listColumnBody&gt;&lt;style&gt;&lt;defaultStyles&gt;&lt;defaultStyle refStyle=&quot;lc&quot;/&gt;&lt;/defaultStyles&gt;&lt;/style&gt;&lt;contents&gt;&lt;HTMLItem&gt;
			&lt;dataSource&gt;
				&lt;staticValue&gt;&amp;lt;input type=&quot;checkbox&quot; onclick=&quot;
checkNested()&quot;&amp;gt;&lt;/staticValue&gt;
			&lt;/dataSource&gt;
		&lt;/HTMLItem&gt;&lt;textItem&gt;&lt;dataSource&gt;&lt;dataItemValue refDataItem=&quot;Year&quot;/&gt;&lt;/dataSource&gt;&lt;/textItem&gt;&lt;/contents&gt;&lt;listColumnRowSpan refDataItem=&quot;Year&quot;/&gt;&lt;/listColumnBody&gt;&lt;/listColumn&gt;&lt;listColumn&gt;&lt;listColumnTitle&gt;&lt;style&gt;&lt;defaultStyles&gt;&lt;defaultStyle refStyle=&quot;lt&quot;/&gt;&lt;/defaultStyles&gt;&lt;/style&gt;&lt;contents&gt;&lt;textItem&gt;&lt;dataSource&gt;&lt;dataItemLabel refDataItem=&quot;Quarter&quot;/&gt;&lt;/dataSource&gt;&lt;/textItem&gt;&lt;/contents&gt;&lt;/listColumnTitle&gt;&lt;listColumnBody&gt;&lt;style&gt;&lt;defaultStyles&gt;&lt;defaultStyle refStyle=&quot;lc&quot;/&gt;&lt;/defaultStyles&gt;&lt;/style&gt;&lt;contents&gt;&lt;HTMLItem description=&quot;Checkbox Start&quot;&gt; 
                                                                                    &lt;dataSource&gt; 
                                                                                        &lt;staticValue&gt;&amp;lt;input title=&quot;Slower but less prone to error&quot; type=&quot;checkbox&quot;  
&lt;/staticValue&gt;&lt;/dataSource&gt; 
                                                                                &lt;/HTMLItem&gt;&lt;HTMLItem description=&quot;checked&quot;&gt; 
            &lt;dataSource&gt; 
                  
            &lt;reportExpression&gt;case when (ParamValue('Quarter') +', ') contains ([Quarter - Category Code] +', ') then (' checked ') else ('') end&lt;/reportExpression&gt;&lt;/dataSource&gt; 
        &lt;/HTMLItem&gt;&lt;HTMLItem description=&quot;onClick&quot;&gt; 
            &lt;dataSource&gt; 
                &lt;staticValue&gt;onClick=&quot;selectInCheckbox('checkbox2',unescape('&lt;/staticValue&gt; 
            &lt;/dataSource&gt; 
        &lt;/HTMLItem&gt;&lt;HTMLItem description=&quot;Code&quot;&gt; 
            &lt;dataSource&gt; 
                  
            &lt;reportExpression&gt;URLEncode ([Prompt].[Quarter - Category Code])&lt;/reportExpression&gt;&lt;/dataSource&gt; 
        &lt;/HTMLItem&gt;&lt;HTMLItem description=&quot;CheckboxEnd&quot;&gt; 
                                                                                    &lt;dataSource&gt; 
                                                                                        &lt;staticValue&gt;')); 
&quot;&amp;gt; 
&lt;/staticValue&gt; 
                                                                                    &lt;/dataSource&gt; 
                                                                                &lt;/HTMLItem&gt;&lt;textItem&gt;&lt;dataSource&gt;&lt;dataItemValue refDataItem=&quot;Quarter&quot;/&gt;&lt;/dataSource&gt;&lt;/textItem&gt;&lt;/contents&gt;&lt;/listColumnBody&gt;&lt;/listColumn&gt;&lt;listColumn&gt;&lt;listColumnTitle&gt;&lt;style&gt;&lt;defaultStyles&gt;&lt;defaultStyle refStyle=&quot;lt&quot;/&gt;&lt;/defaultStyles&gt;&lt;/style&gt;&lt;contents&gt;&lt;textItem&gt;&lt;dataSource&gt;&lt;dataItemLabel refDataItem=&quot;Quantity&quot;/&gt;&lt;/dataSource&gt;&lt;/textItem&gt;&lt;/contents&gt;&lt;/listColumnTitle&gt;&lt;listColumnBody&gt;&lt;style&gt;&lt;defaultStyles&gt;&lt;defaultStyle refStyle=&quot;lm&quot;/&gt;&lt;/defaultStyles&gt;&lt;/style&gt;&lt;contents&gt;&lt;textItem&gt;&lt;dataSource&gt;&lt;dataItemValue refDataItem=&quot;Quantity&quot;/&gt;&lt;/dataSource&gt;&lt;/textItem&gt;&lt;/contents&gt;&lt;/listColumnBody&gt;&lt;/listColumn&gt;&lt;listColumn&gt;&lt;listColumnTitle&gt;&lt;style&gt;&lt;defaultStyles&gt;&lt;defaultStyle refStyle=&quot;lt&quot;/&gt;&lt;/defaultStyles&gt;&lt;/style&gt;&lt;contents&gt;&lt;textItem&gt;&lt;dataSource&gt;&lt;dataItemLabel refDataItem=&quot;Revenue&quot;/&gt;&lt;/dataSource&gt;&lt;/textItem&gt;&lt;/contents&gt;&lt;/listColumnTitle&gt;&lt;listColumnBody&gt;&lt;style&gt;&lt;defaultStyles&gt;&lt;defaultStyle refStyle=&quot;lm&quot;/&gt;&lt;/defaultStyles&gt;&lt;/style&gt;&lt;contents&gt;&lt;textItem&gt;&lt;dataSource&gt;&lt;dataItemValue refDataItem=&quot;Revenue&quot;/&gt;&lt;/dataSource&gt;&lt;/textItem&gt;&lt;/contents&gt;&lt;/listColumnBody&gt;&lt;/listColumn&gt;&lt;listColumn&gt;&lt;listColumnTitle&gt;&lt;style&gt;&lt;defaultStyles&gt;&lt;defaultStyle refStyle=&quot;lt&quot;/&gt;&lt;/defaultStyles&gt;&lt;/style&gt;&lt;contents&gt;&lt;textItem&gt;&lt;dataSource&gt;&lt;dataItemLabel refDataItem=&quot;Gross profit&quot;/&gt;&lt;/dataSource&gt;&lt;/textItem&gt;&lt;/contents&gt;&lt;/listColumnTitle&gt;&lt;listColumnBody&gt;&lt;style&gt;&lt;defaultStyles&gt;&lt;defaultStyle refStyle=&quot;lm&quot;/&gt;&lt;/defaultStyles&gt;&lt;/style&gt;&lt;contents&gt;&lt;textItem&gt;&lt;dataSource&gt;&lt;dataItemValue refDataItem=&quot;Gross profit&quot;/&gt;&lt;/dataSource&gt;&lt;/textItem&gt;&lt;/contents&gt;&lt;/listColumnBody&gt;&lt;/listColumn&gt;&lt;/listColumns&gt;&lt;propertyList&gt;&lt;propertyItem refDataItem=&quot;Year - Category Code&quot;/&gt;&lt;propertyItem refDataItem=&quot;Quarter - Category Code&quot;/&gt;&lt;/propertyList&gt;&lt;listGroups&gt;&lt;listGroup refDataItem=&quot;Time&quot;/&gt;&lt;listGroup refDataItem=&quot;Year&quot;/&gt;&lt;/listGroups&gt;&lt;/list&gt;&lt;HTMLItem description=&quot;/div&quot;&gt; 
                                                                &lt;dataSource&gt; 
                                                                    &lt;staticValue&gt;&amp;lt;/div&amp;gt;&lt;/staticValue&gt; 
                                                                &lt;/dataSource&gt; 
                                                            &lt;/HTMLItem&gt;&lt;HTMLItem description=&quot;doAll&quot;&gt; 
                                                        &lt;dataSource&gt; 
                                                            &lt;staticValue&gt; &amp;lt;input type=&quot;button&quot; value=&quot;Select All&quot; class=&quot;selectbutton&quot; onmouseover = &quot;this.style.cursor='hand'&quot; onclick=&quot;checkAll('list2');&quot;&amp;gt; 
&amp;lt;input type=&quot;button&quot; value=&quot;Clear All&quot; class=&quot;selectbutton&quot; onmouseover = &quot;this.style.cursor='hand'&quot; onclick=&quot;unCheckAll('list2');&quot;&amp;gt;&lt;/staticValue&gt; 
                                                        &lt;/dataSource&gt; 
                                                    &lt;/HTMLItem&gt;&lt;HTMLItem description=&quot;div id=&amp;quot;list3&amp;quot;&quot;&gt; 
                                                                &lt;dataSource&gt; 
                                                                    &lt;staticValue&gt;&amp;lt;div id=&quot;list3&quot;&amp;gt;&lt;/staticValue&gt; 
                                                                &lt;/dataSource&gt; 
                                                            &lt;/HTMLItem&gt;&lt;crosstab name=&quot;Crosstab1&quot; pageBreakText=&quot;false&quot; refQuery=&quot;Prompt&quot; repeatEveryPage=&quot;true&quot;&gt;
			&lt;crosstabCorner&gt;
				&lt;contents/&gt;
				&lt;style&gt;
					&lt;defaultStyles&gt;
						&lt;defaultStyle refStyle=&quot;xm&quot;/&gt;
					&lt;/defaultStyles&gt;
				&lt;/style&gt;
			&lt;/crosstabCorner&gt;
			
			
			
			&lt;style&gt;
				&lt;CSS value=&quot;border-collapse:collapse&quot;/&gt;
				&lt;defaultStyles&gt;
					&lt;defaultStyle refStyle=&quot;xt&quot;/&gt;
				&lt;/defaultStyles&gt;
			&lt;/style&gt;
		&lt;crosstabFactCell&gt;&lt;contents&gt;&lt;textItem&gt;&lt;dataSource&gt;&lt;cellValue/&gt;&lt;/dataSource&gt;&lt;/textItem&gt;&lt;/contents&gt;&lt;style&gt;&lt;defaultStyles&gt;&lt;defaultStyle refStyle=&quot;mv&quot;/&gt;&lt;/defaultStyles&gt;&lt;/style&gt;&lt;/crosstabFactCell&gt;&lt;crosstabColumns&gt;&lt;crosstabNode&gt;&lt;crosstabNodeMembers&gt;&lt;crosstabNodeMember edgeLocation=&quot;e5&quot; refDataItem=&quot;Product line&quot;&gt;&lt;style&gt;&lt;defaultStyles&gt;&lt;defaultStyle refStyle=&quot;ml&quot;/&gt;&lt;/defaultStyles&gt;&lt;/style&gt;&lt;contents&gt;&lt;HTMLItem description=&quot;Checkbox Start&quot;&gt; 
                                                                                    &lt;dataSource&gt; 
                                                                                        &lt;staticValue&gt;&amp;lt;input title=&quot;Slower but less prone to error&quot; type=&quot;checkbox&quot;  
&lt;/staticValue&gt;&lt;/dataSource&gt; 
                                                                                &lt;/HTMLItem&gt;&lt;HTMLItem description=&quot;checked&quot;&gt; 
            &lt;dataSource&gt; 
                  
            &lt;reportExpression&gt;case when (ParamValue('code') +', ') contains ([Product line code] +', ') then (' checked ') else ('') end&lt;/reportExpression&gt;&lt;/dataSource&gt; 
        &lt;/HTMLItem&gt;&lt;HTMLItem description=&quot;onClick&quot;&gt; 
            &lt;dataSource&gt; 
                &lt;staticValue&gt;onClick=&quot;selectInCheckbox('checkbox1','&lt;/staticValue&gt; 
            &lt;/dataSource&gt; 
        &lt;/HTMLItem&gt;&lt;HTMLItem description=&quot;Code&quot;&gt; 
            &lt;dataSource&gt; 
                  
            &lt;dataItemValue refDataItem=&quot;Product line code&quot;/&gt;&lt;/dataSource&gt; 
        &lt;/HTMLItem&gt;&lt;HTMLItem description=&quot;CheckboxEnd&quot;&gt; 
                                                                                    &lt;dataSource&gt; 
                                                                                        &lt;staticValue&gt;'); 
&quot;&amp;gt; 
&lt;/staticValue&gt; 
                                                                                    &lt;/dataSource&gt; 
                                                                                &lt;/HTMLItem&gt;&lt;textItem&gt;&lt;dataSource&gt;&lt;memberCaption/&gt;&lt;/dataSource&gt;&lt;/textItem&gt;&lt;/contents&gt;&lt;propertyList&gt;&lt;propertyItem refDataItem=&quot;Product line code&quot;/&gt;&lt;/propertyList&gt;&lt;/crosstabNodeMember&gt;&lt;/crosstabNodeMembers&gt;&lt;crosstabNestedNodes&gt;&lt;crosstabNode&gt;&lt;crosstabNodeMembers&gt;&lt;crosstabNodeMember edgeLocation=&quot;e1&quot; refDataItem=&quot;Quantity&quot;&gt;&lt;contents&gt;&lt;textItem&gt;&lt;dataSource&gt;&lt;memberCaption/&gt;&lt;/dataSource&gt;&lt;/textItem&gt;&lt;/contents&gt;&lt;style&gt;&lt;defaultStyles&gt;&lt;defaultStyle refStyle=&quot;ml&quot;/&gt;&lt;/defaultStyles&gt;&lt;/style&gt;&lt;/crosstabNodeMember&gt;&lt;/crosstabNodeMembers&gt;&lt;/crosstabNode&gt;&lt;crosstabNode&gt;&lt;crosstabNodeMembers&gt;&lt;crosstabNodeMember edgeLocation=&quot;e2&quot; refDataItem=&quot;Revenue&quot;&gt;&lt;contents&gt;&lt;textItem&gt;&lt;dataSource&gt;&lt;memberCaption/&gt;&lt;/dataSource&gt;&lt;/textItem&gt;&lt;/contents&gt;&lt;style&gt;&lt;defaultStyles&gt;&lt;defaultStyle refStyle=&quot;ml&quot;/&gt;&lt;/defaultStyles&gt;&lt;/style&gt;&lt;/crosstabNodeMember&gt;&lt;/crosstabNodeMembers&gt;&lt;/crosstabNode&gt;&lt;crosstabNode&gt;&lt;crosstabNodeMembers&gt;&lt;crosstabNodeMember edgeLocation=&quot;e3&quot; refDataItem=&quot;Gross profit&quot;&gt;&lt;contents&gt;&lt;textItem&gt;&lt;dataSource&gt;&lt;memberCaption/&gt;&lt;/dataSource&gt;&lt;/textItem&gt;&lt;/contents&gt;&lt;style&gt;&lt;defaultStyles&gt;&lt;defaultStyle refStyle=&quot;ml&quot;/&gt;&lt;/defaultStyles&gt;&lt;/style&gt;&lt;/crosstabNodeMember&gt;&lt;/crosstabNodeMembers&gt;&lt;/crosstabNode&gt;&lt;/crosstabNestedNodes&gt;&lt;/crosstabNode&gt;&lt;/crosstabColumns&gt;&lt;crosstabRows&gt;&lt;crosstabNode&gt;&lt;crosstabNodeMembers&gt;&lt;crosstabNodeMember edgeLocation=&quot;e4&quot; refDataItem=&quot;Quarter&quot;&gt;&lt;style&gt;&lt;defaultStyles&gt;&lt;defaultStyle refStyle=&quot;ml&quot;/&gt;&lt;/defaultStyles&gt;&lt;/style&gt;&lt;contents&gt;&lt;HTMLItem description=&quot;Checkbox Start&quot;&gt; 
                                                                                    &lt;dataSource&gt; 
                                                                                        &lt;staticValue&gt;&amp;lt;input title=&quot;Slower but less prone to error&quot; type=&quot;checkbox&quot;  
&lt;/staticValue&gt;&lt;/dataSource&gt; 
                                                                                &lt;/HTMLItem&gt;&lt;HTMLItem description=&quot;checked&quot;&gt; 
            &lt;dataSource&gt; 
                  
            &lt;reportExpression&gt;case when (ParamValue('Quarter') +', ') contains ([Quarter - Category Code] +', ') then (' checked ') else ('') end&lt;/reportExpression&gt;&lt;/dataSource&gt; 
        &lt;/HTMLItem&gt;&lt;HTMLItem description=&quot;onClick&quot;&gt; 
            &lt;dataSource&gt; 
                &lt;staticValue&gt;onClick=&quot;selectInCheckbox('checkbox2',unescape('&lt;/staticValue&gt; 
            &lt;/dataSource&gt; 
        &lt;/HTMLItem&gt;&lt;HTMLItem description=&quot;Code&quot;&gt; 
            &lt;dataSource&gt; 
                  
            &lt;reportExpression&gt;URLEncode ([Prompt].[Quarter - Category Code])&lt;/reportExpression&gt;&lt;/dataSource&gt; 
        &lt;/HTMLItem&gt;&lt;HTMLItem description=&quot;CheckboxEnd&quot;&gt; 
                                                                                    &lt;dataSource&gt; 
                                                                                        &lt;staticValue&gt;')); 
&quot;&amp;gt; 
&lt;/staticValue&gt; 
                                                                                    &lt;/dataSource&gt; 
                                                                                &lt;/HTMLItem&gt;&lt;textItem&gt;&lt;dataSource&gt;&lt;memberCaption/&gt;&lt;/dataSource&gt;&lt;/textItem&gt;&lt;/contents&gt;&lt;propertyList&gt;&lt;propertyItem refDataItem=&quot;Quarter - Category Code&quot;/&gt;&lt;/propertyList&gt;&lt;/crosstabNodeMember&gt;&lt;/crosstabNodeMembers&gt;&lt;/crosstabNode&gt;&lt;/crosstabRows&gt;&lt;/crosstab&gt;&lt;HTMLItem description=&quot;/div&quot;&gt; 
                                                                &lt;dataSource&gt; 
                                                                    &lt;staticValue&gt;&amp;lt;/div&amp;gt;&lt;/staticValue&gt; 
                                                                &lt;/dataSource&gt; 
                                                            &lt;/HTMLItem&gt;&lt;HTMLItem description=&quot;doAll&quot;&gt; 
                                                        &lt;dataSource&gt; 
                                                            &lt;staticValue&gt; &amp;lt;input type=&quot;button&quot; value=&quot;Select All&quot; class=&quot;selectbutton&quot; onmouseover = &quot;this.style.cursor='hand'&quot; onclick=&quot;checkAll('list3');&quot;&amp;gt; 
&amp;lt;input type=&quot;button&quot; value=&quot;Clear All&quot; class=&quot;selectbutton&quot; onmouseover = &quot;this.style.cursor='hand'&quot; onclick=&quot;unCheckAll('list3');&quot;&amp;gt;&lt;/staticValue&gt; 
                                                        &lt;/dataSource&gt; 
                                                    &lt;/HTMLItem&gt;&lt;/contents&gt;&lt;style&gt;&lt;CSS value=&quot;vertical-align:top&quot;/&gt;&lt;/style&gt;&lt;/tableCell&gt;&lt;/tableCells&gt;&lt;/tableRow&gt;&lt;/tableRows&gt;&lt;/table&gt;&lt;block&gt; 
                                &lt;contents/&gt; 
                            &lt;/block&gt; 
                        &lt;combinationChart maxHotspots=&quot;10000&quot; name=&quot;Combination Chart1&quot; refQuery=&quot;Report&quot; showTooltips=&quot;true&quot;&gt; 
                                &lt;legend&gt; 
                                    &lt;legendPosition&gt; 
                                        &lt;relativePosition/&gt; 
                                    &lt;/legendPosition&gt; 
                                    &lt;legendTitle refQuery=&quot;Report&quot;&gt; 
                                        &lt;style&gt; 
                                            &lt;defaultStyles&gt; 
                                                &lt;defaultStyle refStyle=&quot;lx&quot;/&gt; 
                                            &lt;/defaultStyles&gt; 
                                        &lt;/style&gt; 
                                    &lt;/legendTitle&gt; 
                                    &lt;style&gt; 
                                        &lt;defaultStyles&gt; 
                                            &lt;defaultStyle refStyle=&quot;lg&quot;/&gt; 
                                        &lt;/defaultStyles&gt; 
                                    &lt;/style&gt; 
                                &lt;/legend&gt; 
                                &lt;ordinalAxis&gt; 
                                    &lt;axisTitle refQuery=&quot;Report&quot;&gt; 
                                        &lt;style&gt; 
                                            &lt;defaultStyles&gt; 
                                                &lt;defaultStyle refStyle=&quot;at&quot;/&gt; 
                                            &lt;/defaultStyles&gt; 
                                        &lt;/style&gt; 
                                    &lt;/axisTitle&gt; 
                                    &lt;axisLine color=&quot;black&quot;/&gt; 
                                    &lt;style&gt; 
                                        &lt;defaultStyles&gt; 
                                            &lt;defaultStyle refStyle=&quot;al&quot;/&gt; 
                                        &lt;/defaultStyles&gt; 
                                    &lt;/style&gt; 
                                &lt;/ordinalAxis&gt; 
                                &lt;numericalAxisY1&gt; 
                                    &lt;axisTitle refQuery=&quot;Report&quot;&gt; 
                                        &lt;style&gt; 
                                            &lt;defaultStyles&gt; 
                                                &lt;defaultStyle refStyle=&quot;at&quot;/&gt; 
                                            &lt;/defaultStyles&gt; 
                                        &lt;/style&gt; 
                                    &lt;/axisTitle&gt; 
                                    &lt;gridlines color=&quot;#cccccc&quot;/&gt; 
                                    &lt;axisLine color=&quot;black&quot;/&gt; 
                                    &lt;style&gt; 
                                        &lt;defaultStyles&gt; 
                                            &lt;defaultStyle refStyle=&quot;al&quot;/&gt; 
                                        &lt;/defaultStyles&gt; 
                                    &lt;/style&gt; 
                                &lt;/numericalAxisY1&gt; 
                                &lt;combinationChartTypes&gt; 
                                    &lt;bar&gt;&lt;chartNodes&gt;&lt;chartNode&gt;&lt;chartNodeMembers&gt;&lt;chartNodeMember refDataItem=&quot;Revenue&quot;&gt;&lt;chartContents&gt;&lt;chartTextItem&gt;&lt;dataSource&gt;&lt;memberCaption/&gt;&lt;/dataSource&gt;&lt;/chartTextItem&gt;&lt;/chartContents&gt;&lt;/chartNodeMember&gt;&lt;/chartNodeMembers&gt;&lt;/chartNode&gt;&lt;/chartNodes&gt;&lt;/bar&gt; 
                                &lt;/combinationChartTypes&gt; 
                                &lt;style&gt; 
                                    &lt;defaultStyles&gt; 
                                        &lt;defaultStyle refStyle=&quot;ch&quot;/&gt; 
                                    &lt;/defaultStyles&gt; 
                                &lt;/style&gt; 
                                &lt;commonClusters&gt;&lt;chartNodes&gt;&lt;chartNode&gt;&lt;chartNodeMembers&gt;&lt;chartNodeMember refDataItem=&quot;Product type&quot;&gt;&lt;chartContents&gt;&lt;chartTextItem&gt;&lt;dataSource&gt;&lt;memberCaption/&gt;&lt;/dataSource&gt;&lt;/chartTextItem&gt;&lt;/chartContents&gt;&lt;/chartNodeMember&gt;&lt;/chartNodeMembers&gt;&lt;/chartNode&gt;&lt;/chartNodes&gt;&lt;/commonClusters&gt;&lt;conditionalRender refVariable=&quot;renderGraph&quot;&gt;&lt;renderFor refVariableValue=&quot;1&quot;/&gt;&lt;/conditionalRender&gt;&lt;/combinationChart&gt; 
                        &lt;/contents&gt; 
                    &lt;style&gt;&lt;defaultStyles&gt;&lt;defaultStyle refStyle=&quot;pb&quot;/&gt;&lt;/defaultStyles&gt;&lt;/style&gt;&lt;/pageBody&gt; 
                &lt;style&gt;&lt;defaultStyles&gt;&lt;defaultStyle refStyle=&quot;pg&quot;/&gt;&lt;/defaultStyles&gt;&lt;/style&gt;&lt;/page&gt; 
            &lt;page name=&quot;Page2&quot;&gt; 
                    &lt;pageBody&gt; 
                        &lt;contents&gt;&lt;HTMLItem description=&quot;Styles&quot;&gt; 
                                &lt;dataSource&gt; 
                                    &lt;staticValue&gt;&amp;lt;style type=&quot;text/css&quot;&amp;gt; 
  
input.updatebutton 
{ 
   font-size:11px; 
   font-weight:bold; 
   width:140px; 
   height:27px; 
   color:#000000; 
   background-color:#cdc9c9; 
   border-style:solid; 
   border-color:#003377; 
   border-width:3px; 
} 
  
  
  
input.matchbutton 
{ 
   font-size:11px; 
   font-weight:bold; 
   width:140px; 
   height:27px; 
   color:#EEFFFF; 
   background-color:#0088DD; 
   border-style:solid; 
   border-color:#003377; 
   border-width:3px; 
} 
  
input.selectbutton 
{ 
   font-size:9px; 
   font-weight:bold; 
   width:60px; 
   height:20px; 
   color:#000000; 
   background-color:#FFFFFF; 
   border-style:solid; 
   border-color:#FFFFFF; 
   border-width:3px; 
} 
  
&amp;lt;/style&amp;gt; 
  
&amp;lt;script language=&quot;javascript&quot;&amp;gt; 
  
function goLite(FRM,BTN) 
{ 
   window.document.forms[FRM].elements[BTN].style.color = &quot;#FFFF99&quot;; 
   window.document.forms[FRM].elements[BTN].style.backgroundColor = &quot;#11AAEE&quot;; 
} 
  
function goDim(FRM,BTN) 
{ 
   window.document.forms[FRM].elements[BTN].style.color = &quot;#EEFFFF&quot;; 
   window.document.forms[FRM].elements[BTN].style.backgroundColor = &quot;#0088DD&quot;; 
} 
  
&amp;lt;/script&amp;gt; 
&lt;/staticValue&gt; 
                                &lt;/dataSource&gt; 
                            &lt;/HTMLItem&gt; 
                            &lt;HTMLItem description=&quot;Scripts&quot;&gt; 
                                &lt;dataSource&gt; 
                                    &lt;staticValue&gt;&amp;lt;script&amp;gt; 
function selectInCheckbox(cbGroup,id) 
{ 
   var inputs= document.getElementById(cbGroup).getElementsByTagName('input'); 
   for (var i=0;i&amp;lt;inputs.length;i++) 
   { 
        if (inputs[i].value == id)  
        { 
            inputs[i].click(); 
        } 
   } 
} 
  
function selectInCheckboxRow(cbGroup,id) 
{ 
    var inputs= document.getElementById(cbGroup).getElementsByTagName('input'); 
    inputs[id].click(); 
} 

function checkAll(list){ 
var inputs=document.getElementById(list).getElementsByTagName('input') 
for (var i=0;i&amp;lt;inputs.length;i++){ 
        if (inputs[i].type == 'checkbox') { 
            if (inputs[i].checked == true)  
        {} 
        else {inputs[i].click();} 
        } 
} 
}  
  
function unCheckAll(list){ 
var inputs=document.getElementById(list).getElementsByTagName('input') 
for (var i=0;i&amp;lt;inputs.length;i++){ 
        if (inputs[i].type == 'checkbox') { 
            if (inputs[i].checked == true)  
        {inputs[i].click();} 
        else {} 
        } 
} 
}  
&amp;lt;/script&amp;gt; 
  
&lt;/staticValue&gt; 
                                &lt;/dataSource&gt; 
                            &lt;/HTMLItem&gt; 
                              
                              
                            &lt;promptButton type=&quot;reprompt&quot;&gt; 
            &lt;contents/&gt; 
            &lt;style&gt; 
                &lt;defaultStyles&gt; 
                    &lt;defaultStyle refStyle=&quot;bp&quot;/&gt; 
                &lt;/defaultStyles&gt; 
            &lt;/style&gt; 
        &lt;/promptButton&gt;&lt;table&gt;&lt;style&gt;&lt;defaultStyles&gt;&lt;defaultStyle refStyle=&quot;tb&quot;/&gt;&lt;/defaultStyles&gt;&lt;CSS value=&quot;border-collapse:collapse&quot;/&gt;&lt;/style&gt;&lt;tableRows&gt;&lt;tableRow&gt;&lt;tableCells&gt;&lt;tableCell&gt;&lt;contents&gt;&lt;HTMLItem description=&quot;div&quot;&gt; 
            &lt;dataSource&gt; 
                &lt;staticValue&gt;&amp;lt;div id=&quot;checkbox1&quot; &amp;gt;&lt;/staticValue&gt; 
            &lt;/dataSource&gt; 
        &lt;/HTMLItem&gt;&lt;selectValue multiSelect=&quot;true&quot; parameter=&quot;code&quot; range=&quot;false&quot; refQuery=&quot;Prompt&quot; required=&quot;false&quot; selectValueUI=&quot;checkboxGroup&quot;&gt;&lt;useItem refDataItem=&quot;Product line code&quot;/&gt;&lt;sortList&gt;&lt;sortItem refDataItem=&quot;Product line code&quot;/&gt;&lt;/sortList&gt;&lt;/selectValue&gt;&lt;HTMLItem description=&quot;/div&quot;&gt; 
            &lt;dataSource&gt; 
                &lt;staticValue&gt;&amp;lt;/div&amp;gt;&lt;/staticValue&gt; 
            &lt;/dataSource&gt; 
        &lt;/HTMLItem&gt;&lt;HTMLItem description=&quot;div&quot;&gt; 
            &lt;dataSource&gt; 
                &lt;staticValue&gt;&amp;lt;div id=&quot;checkbox2&quot; &amp;gt;&lt;/staticValue&gt; 
            &lt;/dataSource&gt; 
        &lt;/HTMLItem&gt;&lt;selectValue multiSelect=&quot;true&quot; parameter=&quot;Year&quot; refQuery=&quot;Quarters&quot; required=&quot;false&quot; selectValueUI=&quot;checkboxGroup&quot;&gt;&lt;useItem refDataItem=&quot;Quarter - Category Code&quot;&gt;&lt;displayItem refDataItem=&quot;Quarter&quot;/&gt;&lt;/useItem&gt;&lt;/selectValue&gt;&lt;HTMLItem description=&quot;/div&quot;&gt; 
            &lt;dataSource&gt; 
                &lt;staticValue&gt;&amp;lt;/div&amp;gt;&lt;/staticValue&gt; 
            &lt;/dataSource&gt; 
        &lt;/HTMLItem&gt;&lt;/contents&gt;&lt;style&gt;&lt;CSS value=&quot;vertical-align:top&quot;/&gt;&lt;/style&gt;&lt;/tableCell&gt;&lt;tableCell&gt;&lt;contents/&gt;&lt;style&gt;&lt;CSS value=&quot;vertical-align:top&quot;/&gt;&lt;/style&gt;&lt;/tableCell&gt;&lt;/tableCells&gt;&lt;/tableRow&gt;&lt;/tableRows&gt;&lt;/table&gt;&lt;block&gt; 
                                &lt;contents/&gt; 
                            &lt;/block&gt; 
                        &lt;combinationChart maxHotspots=&quot;10000&quot; name=&quot;Combination Chart2&quot; refQuery=&quot;Report&quot; showTooltips=&quot;true&quot;&gt; 
                                &lt;legend&gt; 
                                    &lt;legendPosition&gt; 
                                        &lt;relativePosition/&gt; 
                                    &lt;/legendPosition&gt; 
                                    &lt;legendTitle refQuery=&quot;Report&quot;&gt; 
                                        &lt;style&gt; 
                                            &lt;defaultStyles&gt; 
                                                &lt;defaultStyle refStyle=&quot;lx&quot;/&gt; 
                                            &lt;/defaultStyles&gt; 
                                        &lt;/style&gt; 
                                    &lt;/legendTitle&gt; 
                                    &lt;style&gt; 
                                        &lt;defaultStyles&gt; 
                                            &lt;defaultStyle refStyle=&quot;lg&quot;/&gt; 
                                        &lt;/defaultStyles&gt; 
                                    &lt;/style&gt; 
                                &lt;/legend&gt; 
                                &lt;ordinalAxis&gt; 
                                    &lt;axisTitle refQuery=&quot;Report&quot;&gt; 
                                        &lt;style&gt; 
                                            &lt;defaultStyles&gt; 
                                                &lt;defaultStyle refStyle=&quot;at&quot;/&gt; 
                                            &lt;/defaultStyles&gt; 
                                        &lt;/style&gt; 
                                    &lt;/axisTitle&gt; 
                                    &lt;axisLine color=&quot;black&quot;/&gt; 
                                    &lt;style&gt; 
                                        &lt;defaultStyles&gt; 
                                            &lt;defaultStyle refStyle=&quot;al&quot;/&gt; 
                                        &lt;/defaultStyles&gt; 
                                    &lt;/style&gt; 
                                &lt;/ordinalAxis&gt; 
                                &lt;numericalAxisY1&gt; 
                                    &lt;axisTitle refQuery=&quot;Report&quot;&gt; 
                                        &lt;style&gt; 
                                            &lt;defaultStyles&gt; 
                                                &lt;defaultStyle refStyle=&quot;at&quot;/&gt; 
                                            &lt;/defaultStyles&gt; 
                                        &lt;/style&gt; 
                                    &lt;/axisTitle&gt; 
                                    &lt;gridlines color=&quot;#cccccc&quot;/&gt; 
                                    &lt;axisLine color=&quot;black&quot;/&gt; 
                                    &lt;style&gt; 
                                        &lt;defaultStyles&gt; 
                                            &lt;defaultStyle refStyle=&quot;al&quot;/&gt; 
                                        &lt;/defaultStyles&gt; 
                                    &lt;/style&gt; 
                                &lt;/numericalAxisY1&gt; 
                                &lt;combinationChartTypes&gt; 
                                    &lt;bar&gt;&lt;chartNodes&gt;&lt;chartNode&gt;&lt;chartNodeMembers&gt;&lt;chartNodeMember refDataItem=&quot;Revenue&quot;&gt;&lt;chartContents&gt;&lt;chartTextItem&gt;&lt;dataSource&gt;&lt;memberCaption/&gt;&lt;/dataSource&gt;&lt;/chartTextItem&gt;&lt;/chartContents&gt;&lt;/chartNodeMember&gt;&lt;/chartNodeMembers&gt;&lt;/chartNode&gt;&lt;/chartNodes&gt;&lt;/bar&gt; 
                                &lt;/combinationChartTypes&gt; 
                                &lt;style&gt; 
                                    &lt;defaultStyles&gt; 
                                        &lt;defaultStyle refStyle=&quot;ch&quot;/&gt; 
                                    &lt;/defaultStyles&gt; 
                                &lt;/style&gt; 
                                &lt;commonClusters&gt;&lt;chartNodes&gt;&lt;chartNode&gt;&lt;chartNodeMembers&gt;&lt;chartNodeMember refDataItem=&quot;Product type&quot;&gt;&lt;chartContents&gt;&lt;chartTextItem&gt;&lt;dataSource&gt;&lt;memberCaption/&gt;&lt;/dataSource&gt;&lt;/chartTextItem&gt;&lt;/chartContents&gt;&lt;/chartNodeMember&gt;&lt;/chartNodeMembers&gt;&lt;/chartNode&gt;&lt;/chartNodes&gt;&lt;/commonClusters&gt;&lt;conditionalRender refVariable=&quot;renderGraph&quot;&gt;&lt;renderFor refVariableValue=&quot;1&quot;/&gt;&lt;/conditionalRender&gt;&lt;/combinationChart&gt; 
                        &lt;/contents&gt; 
                    &lt;style&gt;&lt;defaultStyles&gt;&lt;defaultStyle refStyle=&quot;pb&quot;/&gt;&lt;/defaultStyles&gt;&lt;/style&gt;&lt;/pageBody&gt; 
                &lt;style&gt;&lt;defaultStyles&gt;&lt;defaultStyle refStyle=&quot;pg&quot;/&gt;&lt;/defaultStyles&gt;&lt;/style&gt;&lt;/page&gt;&lt;/reportPages&gt; 
        &lt;/layout&gt; 
    &lt;/layouts&gt; 
&lt;queries&gt; 
      
      
      
          
    &lt;query name=&quot;Prompt&quot;&gt; 
            &lt;source&gt; 
                &lt;model/&gt; 
            &lt;/source&gt; 
            &lt;selection&gt;&lt;dataItem aggregate=&quot;none&quot; name=&quot;Product line code&quot; rollupAggregate=&quot;none&quot;&gt;&lt;expression&gt;[sales_and_marketing].[Products].[Products].[Product line].[Product line - Category Code]&lt;/expression&gt;&lt;/dataItem&gt;&lt;dataItem aggregate=&quot;none&quot; name=&quot;Product line&quot; rollupAggregate=&quot;none&quot;&gt;&lt;expression&gt;[sales_and_marketing].[Products].[Products].[Product line]&lt;/expression&gt;&lt;/dataItem&gt;&lt;dataItem aggregate=&quot;total&quot; name=&quot;Quantity&quot;&gt;&lt;expression&gt;[sales_and_marketing].[Measures].[Quantity]&lt;/expression&gt;&lt;/dataItem&gt;&lt;dataItem aggregate=&quot;total&quot; name=&quot;Revenue&quot;&gt;&lt;expression&gt;[sales_and_marketing].[Measures].[Revenue]&lt;/expression&gt;&lt;/dataItem&gt;&lt;dataItem aggregate=&quot;total&quot; name=&quot;Gross profit&quot;&gt;&lt;expression&gt;[sales_and_marketing].[Measures].[Gross profit]&lt;/expression&gt;&lt;/dataItem&gt;&lt;dataItem aggregate=&quot;none&quot; name=&quot;Year - Category Code&quot;&gt;&lt;expression&gt;[sales_and_marketing].[Time].[Time].[Year].[Year - Category Code]&lt;/expression&gt;&lt;/dataItem&gt;&lt;dataItem aggregate=&quot;none&quot; name=&quot;Year&quot; rollupAggregate=&quot;none&quot; sort=&quot;ascending&quot;&gt;&lt;expression&gt;[sales_and_marketing].[Time].[Time].[Year]&lt;/expression&gt;&lt;/dataItem&gt;&lt;dataItem aggregate=&quot;none&quot; name=&quot;Quarter&quot; rollupAggregate=&quot;none&quot;&gt;&lt;expression&gt;[sales_and_marketing].[Time].[Time].[Quarter]&lt;/expression&gt;&lt;/dataItem&gt;&lt;dataItem aggregate=&quot;none&quot; name=&quot;Quarter - Category Code&quot; rollupAggregate=&quot;none&quot;&gt;&lt;expression&gt;[sales_and_marketing].[Time].[Time].[Quarter].[Quarter - Category Code]&lt;/expression&gt;&lt;/dataItem&gt;&lt;dataItem name=&quot;Time&quot; aggregate=&quot;none&quot; rollupAggregate=&quot;none&quot;&gt;&lt;expression&gt;[sales_and_marketing].[Time].[Time].[Time]-&amp;gt;:[PC].[@MEMBER].[Time]&lt;/expression&gt;&lt;/dataItem&gt;&lt;/selection&gt; 
        &lt;/query&gt;&lt;query name=&quot;Report&quot;&gt;&lt;source&gt;&lt;model/&gt;&lt;/source&gt;&lt;selection&gt;&lt;dataItem aggregate=&quot;total&quot; name=&quot;Revenue&quot;&gt;&lt;expression&gt;[sales_and_marketing].[Measures].[Revenue]&lt;/expression&gt;&lt;/dataItem&gt;&lt;dataItem aggregate=&quot;none&quot; name=&quot;Product type&quot; rollupAggregate=&quot;none&quot;&gt;&lt;expression&gt;[sales_and_marketing].[Products].[Products].[Product type]&lt;/expression&gt;&lt;/dataItem&gt;&lt;/selection&gt;&lt;detailFilters&gt;&lt;detailFilter&gt;&lt;filterExpression&gt;[sales_and_marketing].[Products].[Products].[Product line].[Product line - Category Code] in (?code?)&lt;/filterExpression&gt;&lt;/detailFilter&gt;&lt;detailFilter use=&quot;optional&quot;&gt;&lt;filterExpression&gt;[sales_and_marketing].[Time].[Time].[Quarter].[Quarter - Category Code] in (?Quarter?)&lt;/filterExpression&gt;&lt;/detailFilter&gt;&lt;/detailFilters&gt;&lt;/query&gt;&lt;query name=&quot;Quarters&quot;&gt;&lt;source&gt;&lt;model/&gt;&lt;/source&gt;&lt;selection&gt;&lt;dataItem aggregate=&quot;none&quot; name=&quot;Quarter - Category Code&quot;&gt;&lt;expression&gt;[sales_and_marketing].[Time].[Time].[Quarter].[Quarter - Category Code]&lt;/expression&gt;&lt;/dataItem&gt;&lt;dataItem aggregate=&quot;none&quot; name=&quot;Quarter&quot; sort=&quot;ascending&quot;&gt;&lt;expression&gt;[sales_and_marketing].[Time].[Time].[Quarter]&lt;/expression&gt;&lt;/dataItem&gt;&lt;/selection&gt;&lt;/query&gt;&lt;/queries&gt;&lt;XMLAttributes&gt;&lt;XMLAttribute name=&quot;RS_CreateExtendedDataItems&quot; output=&quot;no&quot; value=&quot;false&quot;/&gt;&lt;XMLAttribute name=&quot;listSeparator&quot; output=&quot;no&quot; value=&quot;,&quot;/&gt;&lt;XMLAttribute name=&quot;RS_modelModificationTime&quot; output=&quot;no&quot; value=&quot;2008-07-25T15:28:38.133Z&quot;/&gt;&lt;/XMLAttributes&gt;&lt;reportVariables&gt;&lt;reportVariable name=&quot;renderGraph&quot; type=&quot;boolean&quot;&gt; 
            &lt;reportExpression&gt;ParamValue('code') is not null&lt;/reportExpression&gt; 
            &lt;variableValues&gt; 
                &lt;variableValue value=&quot;1&quot;/&gt; 
            &lt;/variableValues&gt; 
        &lt;/reportVariable&gt;&lt;/reportVariables&gt;&lt;reportName&gt;checkbox 2&lt;/reportName&gt;&lt;/report&gt;
</pre>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/cognospaul.wordpress.com/392/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/cognospaul.wordpress.com/392/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=cognospaul.wordpress.com&#038;blog=15829318&#038;post=392&#038;subd=cognospaul&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://cognospaul.wordpress.com/2013/05/16/checkbox-list-prompts-revisited/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/d208fbe0e9af940d869577987d9028c1?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">cognospaul</media:title>
		</media:content>
	</item>
		<item>
		<title>Button Prompts in Cognos 10</title>
		<link>http://cognospaul.wordpress.com/2013/04/02/button-prompts-in-cognos-10/</link>
		<comments>http://cognospaul.wordpress.com/2013/04/02/button-prompts-in-cognos-10/#comments</comments>
		<pubDate>Tue, 02 Apr 2013 10:27:12 +0000</pubDate>
		<dc:creator>CognosPaul</dc:creator>
				<category><![CDATA[10]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[Prompts]]></category>

		<guid isPermaLink="false">http://cognospaul.wordpress.com/?p=386</guid>
		<description><![CDATA[One of the features I&#8217;ve always wanted is buttons that set parameters. The existing prompt buttons just serve to provide navigation features to Cognos reports. You can&#8217;t, for instance, press the &#8220;Mountaineering Equipment&#8221; button and see a report which is filtered by mountaineering. Yes, you can use regular checkbox or radio prompts to do this, [&#8230;]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=cognospaul.wordpress.com&#038;blog=15829318&#038;post=386&#038;subd=cognospaul&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>One of the features I&#8217;ve always wanted is buttons that set parameters. The existing prompt buttons just serve to provide navigation features to Cognos reports. You can&#8217;t, for instance, press the &#8220;Mountaineering Equipment&#8221; button and see a report which is filtered by mountaineering. Yes, you can use regular checkbox or radio prompts to do this, but that is hardly the point, is it? I want good, old fashioned buttons!</p>
<p>Consider the following screenshot:<br />
<img src="http://cognospaul.files.wordpress.com/2013/03/report-with-buttons.png?w=630&#038;h=113" alt="report with buttons" width="630" height="113" class="aligncenter size-full wp-image-387" /></p>
<p>There are buttons going across the top, to let the user select which product line, and buttons going down the left to let the user select how he wants to view the report (xtab, bar, or column). </p>
<p>It would be possible to use standard checkbox or radio prompts with this, but it wouldn&#8217;t look nearly as good. Some developers may be tempted to manually create the buttons with extensive use of HTML items. It would work, a certain developer (who will remain anonymous here) used that method for a series of reports and I <em>still</em> get calls asking how to add or remove buttons. </p>
<p>Instead, it is infinitely easier to write JS function that creates the button elements on the fly based on an existing prompt.</p>
<p>Read the following JS (10.2 only):</p>
<pre class="brush: jscript; title: ; notranslate">
&lt;script&gt;

/* 
  * Function: addEvent
  * Author: Dan Fruendel
  * Attachs an event or adds an event listener depending on the browser.
  */
var
  addEvent = function(element, event, func)
  {
    if(element.addEventListener)
    {
      addEvent = function(element, event, func)
      {
        element.addEventListener(event, func, false);
        return true;
      };
    }
    else if(element.attachEvent)
    {
      addEvent = function(element, event, func)
      {
        return element.attachEvent(&quot;on&quot; + event, func);
      };
    }
    else
    {
      addEvent = function(element, event, func)
      {
        var oldEventHandler = element['on' + event];
        element['on' + event] = function()
        {
          //using .apply to pass on anything this function gets.
          if(typeof(oldEventHandler) === &quot;function&quot;)
          {
            oldEventHandler.apply(element, arguments);
          }
          func.apply(element, arguments);
        }
        return true;
      };
    }
    return addEvent(element, event, func);
  }
/*
 * Fake Namespace and prompt getters.
 */ 	
var paulScripts = {}
  , oCR = cognos.Report.getReport(&quot;_THIS_&quot;);

paulScripts.getSource = function()
{
    var targ;
    if (!e) var e = window.event;
    if(!e) return false;
    if (e.target) targ = e.target;
    else if (e.srcElement) targ = e.srcElement;
    if (targ.nodeType == 3) // defeat Safari bug
      targ = targ.parentNode;
    return targ;
}

paulScripts.getControl = function(promptName) {
  return oCR.prompt.getControlByName(promptName);
}

paulScripts.reprompt = function(){
if(!paulScripts.getSource() ) return true;
  oCR.sendRequest(cognos.Report.Action.REPROMPT);
  return true;
}


paulScripts.addButtons = function ( promptName, myClass,reprompt) {
var 
    newOption = ''
  , reprompt = reprompt?reprompt:false
  , id = paulScripts.getControl ( promptName )._id_
  , selElm = document.getElementById('PRMT_SV_'+ id)
  , selElmSelect = document.getElementById('PRMT_SV_LINK_SELECT_'+ id)
  , selElmDeselect = document.getElementById('PRMT_SV_LINK_DESELECT_'+ id)
  , rads = selElm.getElementsByTagName('input')
  , len = rads.length
  , type = len==0?'none':rads[0].type
  , radioClick = function(){for(var radios=paulScripts.getSource().parentNode.getElementsByTagName('input').length/2;radios&lt;paulScripts.getSource().parentNode.getElementsByTagName('input').length;radios++){paulScripts.getSource().parentNode.getElementsByTagName('input')[radios].className=myClass + 'Unselected'};paulScripts.getSource().parentNode.getElementsByTagName('input')[paulScripts.getSource().index].click(); paulScripts.getSource().className=myClass + 'Selected'}
  , checkClick= function(){paulScripts.getSource().parentNode.getElementsByTagName('input')[paulScripts.getSource().index].click(); paulScripts.getSource().className=paulScripts.getSource().className==myClass + 'Selected'?myClass + 'Unselected':myClass + 'Selected';}
  , selectAll= function(){ for(var elms=rads.length;elms&gt;rads.length/2;elms--){rads[elms-1].className=myClass + 'Selected'}}
  , deselectAll= function(){ ; for(var elms=rads.length;elms&gt;rads.length/2;elms--){rads[elms-1].className=myClass + 'Unselected'}}
;
  selElm.className = myClass;

  if(type == 'none') return false;

  for(i=0;i&lt;len;i++)
  {
    newOption = document.createElement( 'input');
    newOption.type='button';
    newOption.value=rads[i].getAttribute('dv');
    newOption.className=rads[i].selected?myClass + 'Selected': myClass + 'Unselected';
    newOption.index=i;
    if(type=='checkbox') {addEvent(newOption,'click',checkClick)};
    if(type=='radio') {addEvent(newOption,'click',radioClick)};
    rads[i].parentNode.parentNode.style.display='none';
    selElm.appendChild(newOption );
  }

  if(reprompt) paulScripts.getControl ( promptName ).setValidator(paulScripts.reprompt);

  if(selElmSelect) addEvent(selElmSelect,'click',selectAll);
  if(selElmDeselect) addEvent(selElmDeselect,'click',deselectAll);
}

paulScripts.addButtons('Products','Horizontal',1);
paulScripts.addButtons('Reports','Vertical');

&lt;/script&gt;
</pre>
<p>Look complicated? It&#8217;s actually not complicated at all. The first function there was written by a friend (and if you think I&#8217;m good at JS&#8230; he&#8217;s the kind of person to look at some code, think for 5 minutes and rewrite it using half the lines and make it run several times faster), it allows you to attach events in different browsers. The getSource function is there because <em>some</em> browsers have issues with THIS. getControl is the 10.2 method of identifying the referenced prompt object. The reprompt function is simply the way I force the report to refresh (on checkbox prompts, for instance).</p>
<p>The meat of the function is in the addButton function. First it finds the prompt object you&#8217;re referencing (using 10.2 methods, needs a rewrite if using in earlier versions). Next it determines if the prompt is a checkbox or radio. If it&#8217;s neither, the function exits. Then it starts creating the actual button elements. It generates an array of all of the elements in the prompt, then for each one creates a button using the display value and hides the original element. Each generated button has a click function that will, in turn, click on the correct checkbox or radio in the original prompt. </p>
<p>The buttons each have a class based on if it&#8217;s selected or not. Clicking on the button will alternate between selected/unselected. The style will have to be included in an HTML item as well. Each style must have three entries, styleName for the top box, styleNameSelected for selected buttons, and styleNameUnselected for unselected buttons. </p>
<p>If the reprompt option is set to true, then it will add the reprompt function to the validator, essentially making it an autosubmit prompt. </p>
<p>Finally, if this is a checkbox group, it will add functions to the select and deselect all links under the prompt.</p>
<p>To use the prompt, it&#8217;s then a simple matter of creating your prompt object on the page, naming it, and calling the function. So in the above screenshot there are two prompts on the page. A multiselect checkbox (based on the product line dimension) above the crosstab, and a radio button (with static choices) to the left.  The function is called twice, once for each prompt. The reprompt flag is set for the checkbox prompt, while the radio is set to autosubmit in the report. </p>
<p>I wrote some simple CSS to highlight the buttons when selected:</p>
<pre class="brush: css; title: ; notranslate">
&lt;style&gt;
.Vertical{
  width:'';
  height:'';
}

.VerticalUnselected{
  padding:2px 10px 3px 10px;
  margin-right:7px;
  background-image:url(../reportstyles/images/button_bg.png);
  background-position:left top;
  background-repeat:repeat-x;
  background-color:#EFEFEF;
  color:#000000;
  font-size:10pt;
  font-weight:normal;
  text-align:center;
  border:1px solid #92afc2;
  width: 75px;
  display:block;
}

.VerticalSelected{
  padding:2px 10px 3px 10px;
  margin-right:7px;
  background-image:url(../reportstyles/images/button_bg.png);
  background-position:left top;
  background-repeat:repeat-x;
  background-color:#A0AFEB;
  color:#000000;
  font-size:10pt;
  font-weight:normal;
  text-align:center;
  border:1px solid #92afc2;
  width: 75px;
  display:block;
}

.Horizontal{
  width:0;
  height:0;
  white-space:nowrap;
}

.HorizontalUnselected{
  padding:2px 10px 3px 10px;
  margin-right:7px;
  background-image:url(../reportstyles/images/button_bg.png);
  background-position:left top;
  background-repeat:repeat-x;
  background-color:#EFEFEF;
  color:#000000;
  font-size:10pt;
  font-weight:normal;
  text-align:center;
  border:1px solid #92afc2;
}

.HorizontalSelected{
  padding:2px 10px 3px 10px;
  margin-right:7px;
  background-image:url(../reportstyles/images/button_bg.png);
  background-position:left top;
  background-repeat:repeat-x;
  background-color:#A0AFEB;
  color:#000000;
  font-size:10pt;
  font-weight:normal;
  text-align:center;
  border:1px solid #92afc2;
}

&lt;/style&gt;
</pre>
<p>Each button group can have it&#8217;s own unique style, if so desired. Just remember to write the CSS for each one. </p>
<p>Ultimately the report consists of 2 prompts, 2 graphs, a crosstab, a conditional block and a single HTML item. </p>
<p>The report XML (10.2, sales and marketing) below:</p>
<pre class="brush: xml; collapse: true; light: false; title: ; toolbar: true; notranslate">
&lt;report xmlns=&quot;http://developer.cognos.com/schemas/report/9.0/&quot; useStyleVersion=&quot;10&quot; expressionLocale=&quot;en-us&quot;&gt;
				&lt;modelPath&gt;/content/folder[@name='Samples']/folder[@name='Cubes']/package[@name='Sales and Marketing (cube)']/model[@name='2008-07-25T15:28:38.072Z']&lt;/modelPath&gt;
				&lt;drillBehavior/&gt;
				&lt;layouts&gt;
					&lt;layout&gt;
						&lt;reportPages&gt;
							&lt;page name=&quot;Page1&quot;&gt;
								&lt;style&gt;
									&lt;defaultStyles&gt;
										&lt;defaultStyle refStyle=&quot;pg&quot;/&gt;
									&lt;/defaultStyles&gt;
								&lt;/style&gt;
								&lt;pageBody&gt;
									&lt;style&gt;
										&lt;defaultStyles&gt;
											&lt;defaultStyle refStyle=&quot;pb&quot;/&gt;
										&lt;/defaultStyles&gt;
									&lt;/style&gt;
									&lt;contents&gt;&lt;table&gt;&lt;style&gt;&lt;defaultStyles&gt;&lt;defaultStyle refStyle=&quot;tb&quot;/&gt;&lt;/defaultStyles&gt;&lt;CSS value=&quot;border-collapse:collapse;width:100%&quot;/&gt;&lt;/style&gt;&lt;tableRows&gt;&lt;tableRow&gt;&lt;tableCells&gt;&lt;tableCell&gt;&lt;contents/&gt;&lt;/tableCell&gt;&lt;tableCell&gt;&lt;contents&gt;&lt;selectValue parameter=&quot;Products&quot; refQuery=&quot;Products&quot; multiSelect=&quot;true&quot; required=&quot;false&quot; name=&quot;Products&quot; selectValueUI=&quot;checkboxGroup&quot;&gt;&lt;useItem refDataItem=&quot;Product line&quot;/&gt;&lt;style&gt;&lt;CSS value=&quot;height:0px;width:0px&quot;/&gt;&lt;/style&gt;&lt;/selectValue&gt;&lt;/contents&gt;&lt;/tableCell&gt;&lt;/tableCells&gt;&lt;/tableRow&gt;&lt;tableRow&gt;&lt;tableCells&gt;&lt;tableCell&gt;&lt;contents&gt;&lt;selectValue selectValueUI=&quot;radioGroup&quot; name=&quot;Reports&quot; autoSubmit=&quot;true&quot; parameter=&quot;ReportType&quot; hideAdornments=&quot;true&quot;&gt;&lt;selectOptions&gt;&lt;selectOption useValue=&quot;1&quot;&gt;&lt;displayValue&gt;Columns&lt;/displayValue&gt;&lt;/selectOption&gt;&lt;selectOption useValue=&quot;2&quot;&gt;&lt;displayValue&gt;Bar&lt;/displayValue&gt;&lt;/selectOption&gt;&lt;selectOption useValue=&quot;3&quot;&gt;&lt;displayValue&gt;Crosstab&lt;/displayValue&gt;&lt;/selectOption&gt;&lt;/selectOptions&gt;&lt;style&gt;&lt;CSS value=&quot;width:0px;height:0px&quot;/&gt;&lt;/style&gt;&lt;defaultSelections&gt;&lt;defaultSimpleSelection&gt;1&lt;/defaultSimpleSelection&gt;&lt;/defaultSelections&gt;&lt;/selectValue&gt;&lt;/contents&gt;&lt;style&gt;&lt;CSS value=&quot;vertical-align:top&quot;/&gt;&lt;/style&gt;&lt;/tableCell&gt;&lt;tableCell&gt;&lt;contents&gt;
												&lt;conditionalBlocks&gt;
			&lt;conditionalBlockDefault&gt;
				&lt;contents/&gt;
			&lt;/conditionalBlockDefault&gt;
		&lt;conditionalBlockCases refVariable=&quot;ReportType&quot;&gt;&lt;conditionalBlock refVariableValue=&quot;1&quot;&gt;&lt;contents&gt;&lt;v2_combinationChart maxHotspots=&quot;10000&quot; refQuery=&quot;Query2&quot; name=&quot;Combination Chart2&quot;&gt;
														&lt;v2_combinationTypeTooltips/&gt;
														&lt;v2_legend&gt;
															&lt;v2_legendPosition&gt;
																&lt;v2_legendPreset/&gt;
															&lt;/v2_legendPosition&gt;
															&lt;v2_legendTitle refQuery=&quot;Query2&quot;&gt;
																&lt;v2_chartTextContents&gt;
																	&lt;v2_automaticText/&gt;
																&lt;/v2_chartTextContents&gt;
																&lt;style&gt;
																	&lt;defaultStyles&gt;
																		&lt;defaultStyle refStyle=&quot;lx&quot;/&gt;
																	&lt;/defaultStyles&gt;
																&lt;/style&gt;
															&lt;/v2_legendTitle&gt;
															&lt;style&gt;
																&lt;defaultStyles&gt;
																	&lt;defaultStyle refStyle=&quot;lg&quot;/&gt;
																&lt;/defaultStyles&gt;
															&lt;/style&gt;
														&lt;/v2_legend&gt;
														&lt;v2_commonAxis&gt;
															&lt;v2_ordinalAxis&gt;
																&lt;v2_axisTitle refQuery=&quot;Query2&quot;&gt;
																	&lt;v2_chartTextContents&gt;
																		&lt;v2_automaticText/&gt;
																	&lt;/v2_chartTextContents&gt;
																	&lt;style&gt;
																		&lt;defaultStyles&gt;
																			&lt;defaultStyle refStyle=&quot;at&quot;/&gt;
																		&lt;/defaultStyles&gt;
																	&lt;/style&gt;
																&lt;/v2_axisTitle&gt;
																&lt;v2_axisLine lineWeight=&quot;0&quot;/&gt;
																&lt;v2_axisLabels&gt;
																	&lt;style&gt;
																		&lt;defaultStyles&gt;
																			&lt;defaultStyle refStyle=&quot;al&quot;/&gt;
																		&lt;/defaultStyles&gt;
																	&lt;/style&gt;
																&lt;/v2_axisLabels&gt;
															&lt;/v2_ordinalAxis&gt;
															&lt;chartNodes&gt;&lt;chartNode&gt;&lt;chartNodeMembers&gt;&lt;chartNodeMember refDataItem=&quot;Product Types&quot;&gt;&lt;chartContents&gt;&lt;chartTextItem&gt;&lt;dataSource&gt;&lt;memberCaption/&gt;&lt;/dataSource&gt;&lt;/chartTextItem&gt;&lt;/chartContents&gt;&lt;/chartNodeMember&gt;&lt;/chartNodeMembers&gt;&lt;/chartNode&gt;&lt;/chartNodes&gt;&lt;/v2_commonAxis&gt;
														&lt;v2_topLeftAxis&gt;
															&lt;v2_combinationChartTypes&gt;
																&lt;v2_bar borders=&quot;show&quot;&gt;
																	&lt;v2_solidPalette&gt;
																		&lt;v2_solidPaletteEntries&gt;
																			&lt;v2_solidPaletteEntry&gt;
																				&lt;v2_fillEffect defaultColor=&quot;#8599D3&quot;&gt;
																					&lt;v2_linearGradient&gt;
																						&lt;v2_gradientColor gradientColor=&quot;#8599D3&quot;/&gt;
																						&lt;v2_gradientColor colorPosition=&quot;100&quot; gradientColor=&quot;#5876AE&quot;/&gt;
																					&lt;/v2_linearGradient&gt;
																				&lt;/v2_fillEffect&gt;
																			&lt;/v2_solidPaletteEntry&gt;
																			&lt;v2_solidPaletteEntry&gt;
																				&lt;v2_fillEffect defaultColor=&quot;#E3AE6C&quot;&gt;
																					&lt;v2_linearGradient&gt;
																						&lt;v2_gradientColor gradientColor=&quot;#E3AE6C&quot;/&gt;
																						&lt;v2_gradientColor colorPosition=&quot;100&quot; gradientColor=&quot;#CD854E&quot;/&gt;
																					&lt;/v2_linearGradient&gt;
																				&lt;/v2_fillEffect&gt;
																			&lt;/v2_solidPaletteEntry&gt;
																			&lt;v2_solidPaletteEntry&gt;
																				&lt;v2_fillEffect defaultColor=&quot;#839862&quot;&gt;
																					&lt;v2_linearGradient&gt;
																						&lt;v2_gradientColor gradientColor=&quot;#839862&quot;/&gt;
																						&lt;v2_gradientColor colorPosition=&quot;100&quot; gradientColor=&quot;#6C7F56&quot;/&gt;
																					&lt;/v2_linearGradient&gt;
																				&lt;/v2_fillEffect&gt;
																			&lt;/v2_solidPaletteEntry&gt;
																			&lt;v2_solidPaletteEntry&gt;
																				&lt;v2_fillEffect defaultColor=&quot;#B7C873&quot;&gt;
																					&lt;v2_linearGradient&gt;
																						&lt;v2_gradientColor gradientColor=&quot;#B7C873&quot;/&gt;
																						&lt;v2_gradientColor colorPosition=&quot;100&quot; gradientColor=&quot;#AFB885&quot;/&gt;
																					&lt;/v2_linearGradient&gt;
																				&lt;/v2_fillEffect&gt;
																			&lt;/v2_solidPaletteEntry&gt;
																			&lt;v2_solidPaletteEntry&gt;
																				&lt;v2_fillEffect defaultColor=&quot;#8484A8&quot;&gt;
																					&lt;v2_linearGradient&gt;
																						&lt;v2_gradientColor gradientColor=&quot;#8484A8&quot;/&gt;
																						&lt;v2_gradientColor colorPosition=&quot;100&quot; gradientColor=&quot;#525E7E&quot;/&gt;
																					&lt;/v2_linearGradient&gt;
																				&lt;/v2_fillEffect&gt;
																			&lt;/v2_solidPaletteEntry&gt;
																			&lt;v2_solidPaletteEntry&gt;
																				&lt;v2_fillEffect defaultColor=&quot;#C0CCED&quot;&gt;
																					&lt;v2_linearGradient&gt;
																						&lt;v2_gradientColor gradientColor=&quot;#C0CCED&quot;/&gt;
																						&lt;v2_gradientColor colorPosition=&quot;100&quot; gradientColor=&quot;#B0C2E5&quot;/&gt;
																					&lt;/v2_linearGradient&gt;
																				&lt;/v2_fillEffect&gt;
																			&lt;/v2_solidPaletteEntry&gt;
																			&lt;v2_solidPaletteEntry&gt;
																				&lt;v2_fillEffect defaultColor=&quot;#8C5580&quot;&gt;
																					&lt;v2_linearGradient&gt;
																						&lt;v2_gradientColor gradientColor=&quot;#8C5580&quot;/&gt;
																						&lt;v2_gradientColor colorPosition=&quot;100&quot; gradientColor=&quot;#794067&quot;/&gt;
																					&lt;/v2_linearGradient&gt;
																				&lt;/v2_fillEffect&gt;
																			&lt;/v2_solidPaletteEntry&gt;
																			&lt;v2_solidPaletteEntry&gt;
																				&lt;v2_fillEffect defaultColor=&quot;#C789BC&quot;&gt;
																					&lt;v2_linearGradient&gt;
																						&lt;v2_gradientColor gradientColor=&quot;#C789BC&quot;/&gt;
																						&lt;v2_gradientColor colorPosition=&quot;100&quot; gradientColor=&quot;#BB72BC&quot;/&gt;
																					&lt;/v2_linearGradient&gt;
																				&lt;/v2_fillEffect&gt;
																			&lt;/v2_solidPaletteEntry&gt;
																			&lt;v2_solidPaletteEntry&gt;
																				&lt;v2_fillEffect defaultColor=&quot;#D5BAEF&quot;&gt;
																					&lt;v2_linearGradient&gt;
																						&lt;v2_gradientColor gradientColor=&quot;#D5BAEF&quot;/&gt;
																						&lt;v2_gradientColor colorPosition=&quot;100&quot; gradientColor=&quot;#C29FD1&quot;/&gt;
																					&lt;/v2_linearGradient&gt;
																				&lt;/v2_fillEffect&gt;
																			&lt;/v2_solidPaletteEntry&gt;
																			&lt;v2_solidPaletteEntry&gt;
																				&lt;v2_fillEffect defaultColor=&quot;#83683F&quot;&gt;
																					&lt;v2_linearGradient&gt;
																						&lt;v2_gradientColor gradientColor=&quot;#83683F&quot;/&gt;
																						&lt;v2_gradientColor colorPosition=&quot;100&quot; gradientColor=&quot;#604926&quot;/&gt;
																					&lt;/v2_linearGradient&gt;
																				&lt;/v2_fillEffect&gt;
																			&lt;/v2_solidPaletteEntry&gt;
																			&lt;v2_solidPaletteEntry&gt;
																				&lt;v2_fillEffect defaultColor=&quot;#DCB05A&quot;&gt;
																					&lt;v2_linearGradient&gt;
																						&lt;v2_gradientColor gradientColor=&quot;#DCB05A&quot;/&gt;
																						&lt;v2_gradientColor colorPosition=&quot;100&quot; gradientColor=&quot;#C09C52&quot;/&gt;
																					&lt;/v2_linearGradient&gt;
																				&lt;/v2_fillEffect&gt;
																			&lt;/v2_solidPaletteEntry&gt;
																			&lt;v2_solidPaletteEntry&gt;
																				&lt;v2_fillEffect defaultColor=&quot;#F4DF9E&quot;&gt;
																					&lt;v2_linearGradient&gt;
																						&lt;v2_gradientColor gradientColor=&quot;#F4DF9E&quot;/&gt;
																						&lt;v2_gradientColor colorPosition=&quot;100&quot; gradientColor=&quot;#E4CF87&quot;/&gt;
																					&lt;/v2_linearGradient&gt;
																				&lt;/v2_fillEffect&gt;
																			&lt;/v2_solidPaletteEntry&gt;
																			&lt;v2_solidPaletteEntry&gt;
																				&lt;v2_fillEffect defaultColor=&quot;#5F8A8C&quot;&gt;
																					&lt;v2_linearGradient&gt;
																						&lt;v2_gradientColor gradientColor=&quot;#5F8A8C&quot;/&gt;
																						&lt;v2_gradientColor colorPosition=&quot;100&quot; gradientColor=&quot;#537579&quot;/&gt;
																					&lt;/v2_linearGradient&gt;
																				&lt;/v2_fillEffect&gt;
																			&lt;/v2_solidPaletteEntry&gt;
																			&lt;v2_solidPaletteEntry&gt;
																				&lt;v2_fillEffect defaultColor=&quot;#96C4B2&quot;&gt;
																					&lt;v2_linearGradient&gt;
																						&lt;v2_gradientColor gradientColor=&quot;#96C4B2&quot;/&gt;
																						&lt;v2_gradientColor colorPosition=&quot;100&quot; gradientColor=&quot;#89B0A0&quot;/&gt;
																					&lt;/v2_linearGradient&gt;
																				&lt;/v2_fillEffect&gt;
																			&lt;/v2_solidPaletteEntry&gt;
																			&lt;v2_solidPaletteEntry&gt;
																				&lt;v2_fillEffect defaultColor=&quot;#CBE8E7&quot;&gt;
																					&lt;v2_linearGradient&gt;
																						&lt;v2_gradientColor gradientColor=&quot;#CBE8E7&quot;/&gt;
																						&lt;v2_gradientColor colorPosition=&quot;100&quot; gradientColor=&quot;#BDD6D5&quot;/&gt;
																					&lt;/v2_linearGradient&gt;
																				&lt;/v2_fillEffect&gt;
																			&lt;/v2_solidPaletteEntry&gt;
																			&lt;v2_solidPaletteEntry&gt;
																				&lt;v2_fillEffect defaultColor=&quot;#AE6564&quot;&gt;
																					&lt;v2_linearGradient&gt;
																						&lt;v2_gradientColor gradientColor=&quot;#AE6564&quot;/&gt;
																						&lt;v2_gradientColor colorPosition=&quot;100&quot; gradientColor=&quot;#875352&quot;/&gt;
																					&lt;/v2_linearGradient&gt;
																				&lt;/v2_fillEffect&gt;
																			&lt;/v2_solidPaletteEntry&gt;
																			&lt;v2_solidPaletteEntry&gt;
																				&lt;v2_fillEffect defaultColor=&quot;#D88C6F&quot;&gt;
																					&lt;v2_linearGradient&gt;
																						&lt;v2_gradientColor gradientColor=&quot;#D88C6F&quot;/&gt;
																						&lt;v2_gradientColor colorPosition=&quot;100&quot; gradientColor=&quot;#C47D61&quot;/&gt;
																					&lt;/v2_linearGradient&gt;
																				&lt;/v2_fillEffect&gt;
																			&lt;/v2_solidPaletteEntry&gt;
																			&lt;v2_solidPaletteEntry&gt;
																				&lt;v2_fillEffect defaultColor=&quot;#E3C9B0&quot;&gt;
																					&lt;v2_linearGradient&gt;
																						&lt;v2_gradientColor gradientColor=&quot;#E3C9B0&quot;/&gt;
																						&lt;v2_gradientColor colorPosition=&quot;100&quot; gradientColor=&quot;#D2B2A5&quot;/&gt;
																					&lt;/v2_linearGradient&gt;
																				&lt;/v2_fillEffect&gt;
																			&lt;/v2_solidPaletteEntry&gt;
																			&lt;v2_solidPaletteEntry&gt;
																				&lt;v2_fillEffect defaultColor=&quot;#848484&quot;&gt;
																					&lt;v2_linearGradient&gt;
																						&lt;v2_gradientColor gradientColor=&quot;#848484&quot;/&gt;
																						&lt;v2_gradientColor colorPosition=&quot;100&quot; gradientColor=&quot;#555555&quot;/&gt;
																					&lt;/v2_linearGradient&gt;
																				&lt;/v2_fillEffect&gt;
																			&lt;/v2_solidPaletteEntry&gt;
																			&lt;v2_solidPaletteEntry&gt;
																				&lt;v2_fillEffect defaultColor=&quot;#a4a4a4&quot;&gt;
																					&lt;v2_linearGradient&gt;
																						&lt;v2_gradientColor gradientColor=&quot;#a4a4a4&quot;/&gt;
																						&lt;v2_gradientColor colorPosition=&quot;100&quot; gradientColor=&quot;#909090&quot;/&gt;
																					&lt;/v2_linearGradient&gt;
																				&lt;/v2_fillEffect&gt;
																			&lt;/v2_solidPaletteEntry&gt;
																			&lt;v2_solidPaletteEntry&gt;
																				&lt;v2_fillEffect defaultColor=&quot;#C7C7C7&quot;&gt;
																					&lt;v2_linearGradient&gt;
																						&lt;v2_gradientColor gradientColor=&quot;#C7C7C7&quot;/&gt;
																						&lt;v2_gradientColor colorPosition=&quot;100&quot; gradientColor=&quot;#c1c1c1&quot;/&gt;
																					&lt;/v2_linearGradient&gt;
																				&lt;/v2_fillEffect&gt;
																			&lt;/v2_solidPaletteEntry&gt;
																		&lt;/v2_solidPaletteEntries&gt;
																	&lt;/v2_solidPalette&gt;
																	&lt;!-- v2_solidPaletteRef ref=&amp;amp;amp;quot;gDefaultSolid&amp;amp;amp;quot;/ --&gt;
																	&lt;chartNodes&gt;&lt;chartNode&gt;&lt;chartNodeMembers&gt;&lt;chartNodeMember refDataItem=&quot;Revenue&quot;&gt;&lt;chartContents&gt;&lt;chartTextItem&gt;&lt;dataSource&gt;&lt;memberCaption/&gt;&lt;/dataSource&gt;&lt;/chartTextItem&gt;&lt;/chartContents&gt;&lt;/chartNodeMember&gt;&lt;/chartNodeMembers&gt;&lt;/chartNode&gt;&lt;/chartNodes&gt;&lt;/v2_bar&gt;
															&lt;/v2_combinationChartTypes&gt;
															&lt;v2_axis&gt;
																&lt;v2_axisTitle refQuery=&quot;Query2&quot;&gt;
																	&lt;v2_chartTextContents&gt;
																		&lt;v2_automaticText/&gt;
																	&lt;/v2_chartTextContents&gt;
																	&lt;style&gt;
																		&lt;defaultStyles&gt;
																			&lt;defaultStyle refStyle=&quot;at&quot;/&gt;
																		&lt;/defaultStyles&gt;
																	&lt;/style&gt;
																&lt;/v2_axisTitle&gt;
																&lt;v2_axisLine lineWeight=&quot;0&quot;/&gt;
																&lt;v2_axisRange&gt;
																	&lt;v2_automaticRange/&gt;
																&lt;/v2_axisRange&gt;
																&lt;v2_axisLabels&gt;
																	&lt;style&gt;
																		&lt;defaultStyles&gt;
																			&lt;defaultStyle refStyle=&quot;al&quot;/&gt;
																		&lt;/defaultStyles&gt;
																	&lt;/style&gt;
																&lt;/v2_axisLabels&gt;
																&lt;v2_majorGridlines lineWeight=&quot;0&quot; lineColor=&quot;#CCCCCC&quot;/&gt;
																&lt;v2_majorBackgroundColors&gt;
																	&lt;v2_firstBackgroundColor color=&quot;#D2D2D2&quot; transparency=&quot;50&quot;/&gt;
																	&lt;v2_secondBackgroundColor color=&quot;#E2E2E2&quot; transparency=&quot;50&quot;/&gt;
																&lt;/v2_majorBackgroundColors&gt;
															&lt;/v2_axis&gt;
														&lt;/v2_topLeftAxis&gt;
														&lt;style&gt;
															&lt;defaultStyles&gt;
																&lt;defaultStyle refStyle=&quot;ch&quot;/&gt;
															&lt;/defaultStyles&gt;
														&lt;/style&gt;
														&lt;noDataHandler&gt;
															&lt;contents&gt;
																&lt;block&gt;
																	&lt;contents&gt;
																		&lt;textItem&gt;
																			&lt;dataSource&gt;
																				&lt;staticValue&gt;No Data Available&lt;/staticValue&gt;
																			&lt;/dataSource&gt;
																			&lt;style&gt;
																				&lt;CSS value=&quot;padding:10px 18px;&quot;/&gt;
																			&lt;/style&gt;
																		&lt;/textItem&gt;
																	&lt;/contents&gt;
																&lt;/block&gt;
															&lt;/contents&gt;
														&lt;/noDataHandler&gt;
														&lt;/v2_combinationChart&gt;&lt;/contents&gt;&lt;/conditionalBlock&gt;&lt;conditionalBlock refVariableValue=&quot;2&quot;&gt;&lt;contents&gt;&lt;v2_combinationChart maxHotspots=&quot;10000&quot; orientation=&quot;horizontal&quot; refQuery=&quot;Query2&quot; name=&quot;Combination Chart1&quot;&gt;
																		&lt;v2_combinationTypeTooltips/&gt;
																		&lt;v2_legend&gt;
																			&lt;v2_legendPosition&gt;
																				&lt;v2_legendPreset/&gt;
																			&lt;/v2_legendPosition&gt;
																			&lt;v2_legendTitle refQuery=&quot;Query2&quot;&gt;
																				&lt;v2_chartTextContents&gt;
																					&lt;v2_automaticText/&gt;
																				&lt;/v2_chartTextContents&gt;
																				&lt;style&gt;
																					&lt;defaultStyles&gt;
																						&lt;defaultStyle refStyle=&quot;lx&quot;/&gt;
																					&lt;/defaultStyles&gt;
																				&lt;/style&gt;
																			&lt;/v2_legendTitle&gt;
																			&lt;style&gt;
																				&lt;defaultStyles&gt;
																					&lt;defaultStyle refStyle=&quot;lg&quot;/&gt;
																				&lt;/defaultStyles&gt;
																			&lt;/style&gt;
																		&lt;/v2_legend&gt;
																		&lt;v2_commonAxis&gt;
																			&lt;v2_ordinalAxis&gt;
																				&lt;v2_axisTitle refQuery=&quot;Query2&quot;&gt;
																					&lt;v2_chartTextContents&gt;
																						&lt;v2_automaticText/&gt;
																					&lt;/v2_chartTextContents&gt;
																					&lt;style&gt;
																						&lt;defaultStyles&gt;
																							&lt;defaultStyle refStyle=&quot;at&quot;/&gt;
																						&lt;/defaultStyles&gt;
																					&lt;/style&gt;
																				&lt;/v2_axisTitle&gt;
																				&lt;v2_axisLine lineWeight=&quot;0&quot;/&gt;
																				&lt;v2_axisLabels&gt;
																					&lt;style&gt;
																						&lt;defaultStyles&gt;
																							&lt;defaultStyle refStyle=&quot;al&quot;/&gt;
																						&lt;/defaultStyles&gt;
																					&lt;/style&gt;
																				&lt;/v2_axisLabels&gt;
																			&lt;/v2_ordinalAxis&gt;
																			&lt;chartNodes&gt;&lt;chartNode&gt;&lt;chartNodeMembers&gt;&lt;chartNodeMember refDataItem=&quot;Product Types&quot;&gt;&lt;chartContents&gt;&lt;chartTextItem&gt;&lt;dataSource&gt;&lt;memberCaption/&gt;&lt;/dataSource&gt;&lt;/chartTextItem&gt;&lt;/chartContents&gt;&lt;/chartNodeMember&gt;&lt;/chartNodeMembers&gt;&lt;/chartNode&gt;&lt;/chartNodes&gt;&lt;/v2_commonAxis&gt;
																		&lt;v2_topLeftAxis&gt;
																			&lt;v2_combinationChartTypes&gt;
																				&lt;v2_bar borders=&quot;show&quot;&gt;
																					&lt;v2_solidPalette&gt;
																						&lt;v2_solidPaletteEntries&gt;
																							&lt;v2_solidPaletteEntry&gt;
																								&lt;v2_fillEffect defaultColor=&quot;#8599D3&quot;&gt;
																									&lt;v2_linearGradient&gt;
																										&lt;v2_gradientColor gradientColor=&quot;#8599D3&quot;/&gt;
																										&lt;v2_gradientColor colorPosition=&quot;100&quot; gradientColor=&quot;#5876AE&quot;/&gt;
																									&lt;/v2_linearGradient&gt;
																								&lt;/v2_fillEffect&gt;
																							&lt;/v2_solidPaletteEntry&gt;
																							&lt;v2_solidPaletteEntry&gt;
																								&lt;v2_fillEffect defaultColor=&quot;#E3AE6C&quot;&gt;
																									&lt;v2_linearGradient&gt;
																										&lt;v2_gradientColor gradientColor=&quot;#E3AE6C&quot;/&gt;
																										&lt;v2_gradientColor colorPosition=&quot;100&quot; gradientColor=&quot;#CD854E&quot;/&gt;
																									&lt;/v2_linearGradient&gt;
																								&lt;/v2_fillEffect&gt;
																							&lt;/v2_solidPaletteEntry&gt;
																							&lt;v2_solidPaletteEntry&gt;
																								&lt;v2_fillEffect defaultColor=&quot;#839862&quot;&gt;
																									&lt;v2_linearGradient&gt;
																										&lt;v2_gradientColor gradientColor=&quot;#839862&quot;/&gt;
																										&lt;v2_gradientColor colorPosition=&quot;100&quot; gradientColor=&quot;#6C7F56&quot;/&gt;
																									&lt;/v2_linearGradient&gt;
																								&lt;/v2_fillEffect&gt;
																							&lt;/v2_solidPaletteEntry&gt;
																							&lt;v2_solidPaletteEntry&gt;
																								&lt;v2_fillEffect defaultColor=&quot;#B7C873&quot;&gt;
																									&lt;v2_linearGradient&gt;
																										&lt;v2_gradientColor gradientColor=&quot;#B7C873&quot;/&gt;
																										&lt;v2_gradientColor colorPosition=&quot;100&quot; gradientColor=&quot;#AFB885&quot;/&gt;
																									&lt;/v2_linearGradient&gt;
																								&lt;/v2_fillEffect&gt;
																							&lt;/v2_solidPaletteEntry&gt;
																							&lt;v2_solidPaletteEntry&gt;
																								&lt;v2_fillEffect defaultColor=&quot;#8484A8&quot;&gt;
																									&lt;v2_linearGradient&gt;
																										&lt;v2_gradientColor gradientColor=&quot;#8484A8&quot;/&gt;
																										&lt;v2_gradientColor colorPosition=&quot;100&quot; gradientColor=&quot;#525E7E&quot;/&gt;
																									&lt;/v2_linearGradient&gt;
																								&lt;/v2_fillEffect&gt;
																							&lt;/v2_solidPaletteEntry&gt;
																							&lt;v2_solidPaletteEntry&gt;
																								&lt;v2_fillEffect defaultColor=&quot;#C0CCED&quot;&gt;
																									&lt;v2_linearGradient&gt;
																										&lt;v2_gradientColor gradientColor=&quot;#C0CCED&quot;/&gt;
																										&lt;v2_gradientColor colorPosition=&quot;100&quot; gradientColor=&quot;#B0C2E5&quot;/&gt;
																									&lt;/v2_linearGradient&gt;
																								&lt;/v2_fillEffect&gt;
																							&lt;/v2_solidPaletteEntry&gt;
																							&lt;v2_solidPaletteEntry&gt;
																								&lt;v2_fillEffect defaultColor=&quot;#8C5580&quot;&gt;
																									&lt;v2_linearGradient&gt;
																										&lt;v2_gradientColor gradientColor=&quot;#8C5580&quot;/&gt;
																										&lt;v2_gradientColor colorPosition=&quot;100&quot; gradientColor=&quot;#794067&quot;/&gt;
																									&lt;/v2_linearGradient&gt;
																								&lt;/v2_fillEffect&gt;
																							&lt;/v2_solidPaletteEntry&gt;
																							&lt;v2_solidPaletteEntry&gt;
																								&lt;v2_fillEffect defaultColor=&quot;#C789BC&quot;&gt;
																									&lt;v2_linearGradient&gt;
																										&lt;v2_gradientColor gradientColor=&quot;#C789BC&quot;/&gt;
																										&lt;v2_gradientColor colorPosition=&quot;100&quot; gradientColor=&quot;#BB72BC&quot;/&gt;
																									&lt;/v2_linearGradient&gt;
																								&lt;/v2_fillEffect&gt;
																							&lt;/v2_solidPaletteEntry&gt;
																							&lt;v2_solidPaletteEntry&gt;
																								&lt;v2_fillEffect defaultColor=&quot;#D5BAEF&quot;&gt;
																									&lt;v2_linearGradient&gt;
																										&lt;v2_gradientColor gradientColor=&quot;#D5BAEF&quot;/&gt;
																										&lt;v2_gradientColor colorPosition=&quot;100&quot; gradientColor=&quot;#C29FD1&quot;/&gt;
																									&lt;/v2_linearGradient&gt;
																								&lt;/v2_fillEffect&gt;
																							&lt;/v2_solidPaletteEntry&gt;
																							&lt;v2_solidPaletteEntry&gt;
																								&lt;v2_fillEffect defaultColor=&quot;#83683F&quot;&gt;
																									&lt;v2_linearGradient&gt;
																										&lt;v2_gradientColor gradientColor=&quot;#83683F&quot;/&gt;
																										&lt;v2_gradientColor colorPosition=&quot;100&quot; gradientColor=&quot;#604926&quot;/&gt;
																									&lt;/v2_linearGradient&gt;
																								&lt;/v2_fillEffect&gt;
																							&lt;/v2_solidPaletteEntry&gt;
																							&lt;v2_solidPaletteEntry&gt;
																								&lt;v2_fillEffect defaultColor=&quot;#DCB05A&quot;&gt;
																									&lt;v2_linearGradient&gt;
																										&lt;v2_gradientColor gradientColor=&quot;#DCB05A&quot;/&gt;
																										&lt;v2_gradientColor colorPosition=&quot;100&quot; gradientColor=&quot;#C09C52&quot;/&gt;
																									&lt;/v2_linearGradient&gt;
																								&lt;/v2_fillEffect&gt;
																							&lt;/v2_solidPaletteEntry&gt;
																							&lt;v2_solidPaletteEntry&gt;
																								&lt;v2_fillEffect defaultColor=&quot;#F4DF9E&quot;&gt;
																									&lt;v2_linearGradient&gt;
																										&lt;v2_gradientColor gradientColor=&quot;#F4DF9E&quot;/&gt;
																										&lt;v2_gradientColor colorPosition=&quot;100&quot; gradientColor=&quot;#E4CF87&quot;/&gt;
																									&lt;/v2_linearGradient&gt;
																								&lt;/v2_fillEffect&gt;
																							&lt;/v2_solidPaletteEntry&gt;
																							&lt;v2_solidPaletteEntry&gt;
																								&lt;v2_fillEffect defaultColor=&quot;#5F8A8C&quot;&gt;
																									&lt;v2_linearGradient&gt;
																										&lt;v2_gradientColor gradientColor=&quot;#5F8A8C&quot;/&gt;
																										&lt;v2_gradientColor colorPosition=&quot;100&quot; gradientColor=&quot;#537579&quot;/&gt;
																									&lt;/v2_linearGradient&gt;
																								&lt;/v2_fillEffect&gt;
																							&lt;/v2_solidPaletteEntry&gt;
																							&lt;v2_solidPaletteEntry&gt;
																								&lt;v2_fillEffect defaultColor=&quot;#96C4B2&quot;&gt;
																									&lt;v2_linearGradient&gt;
																										&lt;v2_gradientColor gradientColor=&quot;#96C4B2&quot;/&gt;
																										&lt;v2_gradientColor colorPosition=&quot;100&quot; gradientColor=&quot;#89B0A0&quot;/&gt;
																									&lt;/v2_linearGradient&gt;
																								&lt;/v2_fillEffect&gt;
																							&lt;/v2_solidPaletteEntry&gt;
																							&lt;v2_solidPaletteEntry&gt;
																								&lt;v2_fillEffect defaultColor=&quot;#CBE8E7&quot;&gt;
																									&lt;v2_linearGradient&gt;
																										&lt;v2_gradientColor gradientColor=&quot;#CBE8E7&quot;/&gt;
																										&lt;v2_gradientColor colorPosition=&quot;100&quot; gradientColor=&quot;#BDD6D5&quot;/&gt;
																									&lt;/v2_linearGradient&gt;
																								&lt;/v2_fillEffect&gt;
																							&lt;/v2_solidPaletteEntry&gt;
																							&lt;v2_solidPaletteEntry&gt;
																								&lt;v2_fillEffect defaultColor=&quot;#AE6564&quot;&gt;
																									&lt;v2_linearGradient&gt;
																										&lt;v2_gradientColor gradientColor=&quot;#AE6564&quot;/&gt;
																										&lt;v2_gradientColor colorPosition=&quot;100&quot; gradientColor=&quot;#875352&quot;/&gt;
																									&lt;/v2_linearGradient&gt;
																								&lt;/v2_fillEffect&gt;
																							&lt;/v2_solidPaletteEntry&gt;
																							&lt;v2_solidPaletteEntry&gt;
																								&lt;v2_fillEffect defaultColor=&quot;#D88C6F&quot;&gt;
																									&lt;v2_linearGradient&gt;
																										&lt;v2_gradientColor gradientColor=&quot;#D88C6F&quot;/&gt;
																										&lt;v2_gradientColor colorPosition=&quot;100&quot; gradientColor=&quot;#C47D61&quot;/&gt;
																									&lt;/v2_linearGradient&gt;
																								&lt;/v2_fillEffect&gt;
																							&lt;/v2_solidPaletteEntry&gt;
																							&lt;v2_solidPaletteEntry&gt;
																								&lt;v2_fillEffect defaultColor=&quot;#E3C9B0&quot;&gt;
																									&lt;v2_linearGradient&gt;
																										&lt;v2_gradientColor gradientColor=&quot;#E3C9B0&quot;/&gt;
																										&lt;v2_gradientColor colorPosition=&quot;100&quot; gradientColor=&quot;#D2B2A5&quot;/&gt;
																									&lt;/v2_linearGradient&gt;
																								&lt;/v2_fillEffect&gt;
																							&lt;/v2_solidPaletteEntry&gt;
																							&lt;v2_solidPaletteEntry&gt;
																								&lt;v2_fillEffect defaultColor=&quot;#848484&quot;&gt;
																									&lt;v2_linearGradient&gt;
																										&lt;v2_gradientColor gradientColor=&quot;#848484&quot;/&gt;
																										&lt;v2_gradientColor colorPosition=&quot;100&quot; gradientColor=&quot;#555555&quot;/&gt;
																									&lt;/v2_linearGradient&gt;
																								&lt;/v2_fillEffect&gt;
																							&lt;/v2_solidPaletteEntry&gt;
																							&lt;v2_solidPaletteEntry&gt;
																								&lt;v2_fillEffect defaultColor=&quot;#a4a4a4&quot;&gt;
																									&lt;v2_linearGradient&gt;
																										&lt;v2_gradientColor gradientColor=&quot;#a4a4a4&quot;/&gt;
																										&lt;v2_gradientColor colorPosition=&quot;100&quot; gradientColor=&quot;#909090&quot;/&gt;
																									&lt;/v2_linearGradient&gt;
																								&lt;/v2_fillEffect&gt;
																							&lt;/v2_solidPaletteEntry&gt;
																							&lt;v2_solidPaletteEntry&gt;
																								&lt;v2_fillEffect defaultColor=&quot;#C7C7C7&quot;&gt;
																									&lt;v2_linearGradient&gt;
																										&lt;v2_gradientColor gradientColor=&quot;#C7C7C7&quot;/&gt;
																										&lt;v2_gradientColor colorPosition=&quot;100&quot; gradientColor=&quot;#c1c1c1&quot;/&gt;
																									&lt;/v2_linearGradient&gt;
																								&lt;/v2_fillEffect&gt;
																							&lt;/v2_solidPaletteEntry&gt;
																						&lt;/v2_solidPaletteEntries&gt;
																					&lt;/v2_solidPalette&gt;
																					&lt;!-- v2_solidPaletteRef ref=&amp;amp;amp;quot;gDefaultSolid&amp;amp;amp;quot;/ --&gt;
																					&lt;chartNodes&gt;&lt;chartNode&gt;&lt;chartNodeMembers&gt;&lt;chartNodeMember refDataItem=&quot;Revenue&quot;&gt;&lt;chartContents&gt;&lt;chartTextItem&gt;&lt;dataSource&gt;&lt;memberCaption/&gt;&lt;/dataSource&gt;&lt;/chartTextItem&gt;&lt;/chartContents&gt;&lt;/chartNodeMember&gt;&lt;/chartNodeMembers&gt;&lt;/chartNode&gt;&lt;/chartNodes&gt;&lt;/v2_bar&gt;
																			&lt;/v2_combinationChartTypes&gt;
																			&lt;v2_axis&gt;
																				&lt;v2_axisTitle refQuery=&quot;Query2&quot;&gt;
																					&lt;v2_chartTextContents&gt;
																						&lt;v2_automaticText/&gt;
																					&lt;/v2_chartTextContents&gt;
																					&lt;style&gt;
																						&lt;defaultStyles&gt;
																							&lt;defaultStyle refStyle=&quot;at&quot;/&gt;
																						&lt;/defaultStyles&gt;
																					&lt;/style&gt;
																				&lt;/v2_axisTitle&gt;
																				&lt;v2_axisLine lineWeight=&quot;0&quot;/&gt;
																				&lt;v2_axisRange&gt;
																					&lt;v2_automaticRange/&gt;
																				&lt;/v2_axisRange&gt;
																				&lt;v2_axisLabels&gt;
																					&lt;style&gt;
																						&lt;defaultStyles&gt;
																							&lt;defaultStyle refStyle=&quot;al&quot;/&gt;
																						&lt;/defaultStyles&gt;
																					&lt;/style&gt;
																				&lt;/v2_axisLabels&gt;
																				&lt;v2_majorGridlines lineWeight=&quot;0&quot; lineColor=&quot;#CCCCCC&quot;/&gt;
																				&lt;v2_majorBackgroundColors&gt;
																					&lt;v2_firstBackgroundColor color=&quot;#D2D2D2&quot; transparency=&quot;50&quot;/&gt;
																					&lt;v2_secondBackgroundColor color=&quot;#E2E2E2&quot; transparency=&quot;50&quot;/&gt;
																				&lt;/v2_majorBackgroundColors&gt;
																			&lt;/v2_axis&gt;
																		&lt;/v2_topLeftAxis&gt;
																		&lt;style&gt;
																			&lt;CSS value=&quot;&quot;/&gt;&lt;defaultStyles&gt;&lt;defaultStyle refStyle=&quot;ch&quot;/&gt;&lt;/defaultStyles&gt;&lt;/style&gt;
																		&lt;noDataHandler&gt;
																			&lt;contents&gt;
																				&lt;block&gt;
																					&lt;contents&gt;
																						&lt;textItem&gt;
																							&lt;dataSource&gt;
																								&lt;staticValue&gt;No Data Available&lt;/staticValue&gt;
																							&lt;/dataSource&gt;
																							&lt;style&gt;
																								&lt;CSS value=&quot;padding:10px 18px;&quot;/&gt;
																							&lt;/style&gt;
																						&lt;/textItem&gt;
																					&lt;/contents&gt;
																				&lt;/block&gt;
																			&lt;/contents&gt;
																		&lt;/noDataHandler&gt;
																		&lt;/v2_combinationChart&gt;
																&lt;/contents&gt;&lt;/conditionalBlock&gt;&lt;conditionalBlock refVariableValue=&quot;3&quot;&gt;&lt;contents&gt;&lt;crosstab name=&quot;Crosstab1&quot; refQuery=&quot;Query2&quot; pageBreakText=&quot;false&quot; repeatEveryPage=&quot;true&quot;&gt;
			&lt;crosstabCorner&gt;
				&lt;contents/&gt;
				&lt;style&gt;
					&lt;defaultStyles&gt;
						&lt;defaultStyle refStyle=&quot;xm&quot;/&gt;
					&lt;/defaultStyles&gt;
				&lt;/style&gt;
			&lt;/crosstabCorner&gt;
			
			
			&lt;noDataHandler&gt;
				&lt;contents&gt;
					&lt;block&gt;
						&lt;contents&gt;
							&lt;textItem&gt;
								&lt;dataSource&gt;
									&lt;staticValue&gt;No Data Available&lt;/staticValue&gt;
								&lt;/dataSource&gt;
								&lt;style&gt;
									&lt;CSS value=&quot;padding:10px 18px;&quot;/&gt;
								&lt;/style&gt;
							&lt;/textItem&gt;
						&lt;/contents&gt;
					&lt;/block&gt;
				&lt;/contents&gt;
			&lt;/noDataHandler&gt;
			&lt;style&gt;
				&lt;CSS value=&quot;border-collapse:collapse&quot;/&gt;
				&lt;defaultStyles&gt;
					&lt;defaultStyle refStyle=&quot;xt&quot;/&gt;
				&lt;/defaultStyles&gt;
			&lt;/style&gt;
		&lt;crosstabFactCell&gt;&lt;contents&gt;&lt;textItem&gt;&lt;dataSource&gt;&lt;cellValue/&gt;&lt;/dataSource&gt;&lt;/textItem&gt;&lt;/contents&gt;&lt;style&gt;&lt;defaultStyles&gt;&lt;defaultStyle refStyle=&quot;mv&quot;/&gt;&lt;/defaultStyles&gt;&lt;/style&gt;&lt;/crosstabFactCell&gt;&lt;crosstabRows&gt;&lt;crosstabNode&gt;&lt;crosstabNodeMembers&gt;&lt;crosstabNodeMember refDataItem=&quot;Product Types&quot; edgeLocation=&quot;e1&quot;&gt;&lt;style&gt;&lt;defaultStyles&gt;&lt;defaultStyle refStyle=&quot;ml&quot;/&gt;&lt;/defaultStyles&gt;&lt;/style&gt;&lt;contents&gt;&lt;textItem&gt;&lt;dataSource&gt;&lt;memberCaption/&gt;&lt;/dataSource&gt;&lt;/textItem&gt;&lt;/contents&gt;&lt;/crosstabNodeMember&gt;&lt;/crosstabNodeMembers&gt;&lt;/crosstabNode&gt;&lt;/crosstabRows&gt;&lt;crosstabColumns&gt;&lt;crosstabNode&gt;&lt;crosstabNodeMembers&gt;&lt;crosstabNodeMember refDataItem=&quot;Revenue&quot; edgeLocation=&quot;e2&quot;&gt;&lt;style&gt;&lt;defaultStyles&gt;&lt;defaultStyle refStyle=&quot;ml&quot;/&gt;&lt;/defaultStyles&gt;&lt;/style&gt;&lt;contents&gt;&lt;textItem&gt;&lt;dataSource&gt;&lt;memberCaption/&gt;&lt;/dataSource&gt;&lt;/textItem&gt;&lt;/contents&gt;&lt;/crosstabNodeMember&gt;&lt;/crosstabNodeMembers&gt;&lt;/crosstabNode&gt;&lt;/crosstabColumns&gt;&lt;/crosstab&gt;&lt;/contents&gt;&lt;/conditionalBlock&gt;&lt;/conditionalBlockCases&gt;&lt;/conditionalBlocks&gt;&lt;/contents&gt;&lt;style&gt;&lt;CSS value=&quot;width:100%;vertical-align:top;text-align:left&quot;/&gt;&lt;/style&gt;&lt;/tableCell&gt;&lt;/tableCells&gt;&lt;/tableRow&gt;&lt;/tableRows&gt;&lt;/table&gt;&lt;HTMLItem&gt;
			&lt;dataSource&gt;
				&lt;staticValue&gt;&amp;lt;style&amp;gt;
.Vertical{
  width:'';
  height:'';
}

.VerticalUnselected{
  padding:2px 10px 3px 10px;
  margin-right:7px;
  background-image:url(../reportstyles/images/button_bg.png);
  background-position:left top;
  background-repeat:repeat-x;
  background-color:#EFEFEF;
  color:#000000;
  font-size:10pt;
  font-weight:normal;
  text-align:center;
  border:1px solid #92afc2;
  width: 75px;
  display:block;
}

.VerticalSelected{
  padding:2px 10px 3px 10px;
  margin-right:7px;
  background-image:url(../reportstyles/images/button_bg.png);
  background-position:left top;
  background-repeat:repeat-x;
  background-color:#A0AFEB;
  color:#000000;
  font-size:10pt;
  font-weight:normal;
  text-align:center;
  border:1px solid #92afc2;
  width: 75px;
  display:block;
}

.Horizontal{
  width:0;
  height:0;
  white-space:nowrap;
}

.HorizontalUnselected{
  padding:2px 10px 3px 10px;
  margin-right:7px;
  background-image:url(../reportstyles/images/button_bg.png);
  background-position:left top;
  background-repeat:repeat-x;
  background-color:#EFEFEF;
  color:#000000;
  font-size:10pt;
  font-weight:normal;
  text-align:center;
  border:1px solid #92afc2;
}

.HorizontalSelected{
  padding:2px 10px 3px 10px;
  margin-right:7px;
  background-image:url(../reportstyles/images/button_bg.png);
  background-position:left top;
  background-repeat:repeat-x;
  background-color:#A0AFEB;
  color:#000000;
  font-size:10pt;
  font-weight:normal;
  text-align:center;
  border:1px solid #92afc2;
}

&amp;lt;/style&amp;gt;
&amp;lt;script&amp;gt;

/* 
  * Function: addEvent
  * Author: Dan Fruendel
  * Attachs an event or adds an event listener depending on the browser.
  */
var
  addEvent = function(element, event, func)
  {
    if(element.addEventListener)
    {
      addEvent = function(element, event, func)
      {
        element.addEventListener(event, func, false);
        return true;
      };
    }
    else if(element.attachEvent)
    {
      addEvent = function(element, event, func)
      {
        return element.attachEvent(&quot;on&quot; + event, func);
      };
    }
    else
    {
      addEvent = function(element, event, func)
      {
        var oldEventHandler = element['on' + event];
        element['on' + event] = function()
        {
          //using .apply to pass on anything this function gets.
          if(typeof(oldEventHandler) === &quot;function&quot;)
          {
            oldEventHandler.apply(element, arguments);
          }
          func.apply(element, arguments);
        }
        return true;
      };
    }
    return addEvent(element, event, func);
  }
/*
 * Fake Namespace and prompt getters.
 */ 	
var paulScripts = {}
  , oCR = cognos.Report.getReport(&quot;_THIS_&quot;);

paulScripts.getSource = function()
{
    var targ;
    if (!e) var e = window.event;
    if(!e) return false;
    if (e.target) targ = e.target;
    else if (e.srcElement) targ = e.srcElement;
    if (targ.nodeType == 3) // defeat Safari bug
      targ = targ.parentNode;
    return targ;
}

paulScripts.getControl = function(promptName) {
  return oCR.prompt.getControlByName(promptName);
}

paulScripts.reprompt = function(){
if(!paulScripts.getSource() ) return true;
  oCR.sendRequest(cognos.Report.Action.REPROMPT);
  return true;
}


paulScripts.addButtons = function ( promptName, myClass,reprompt) {
var 
    newOption = ''
  , reprompt = reprompt?reprompt:false
  , id = paulScripts.getControl ( promptName )._id_
  , selElm = document.getElementById('PRMT_SV_'+ id)
  , selElmSelect = document.getElementById('PRMT_SV_LINK_SELECT_'+ id)
  , selElmDeselect = document.getElementById('PRMT_SV_LINK_DESELECT_'+ id)
  , rads = selElm.getElementsByTagName('input')
  , len = rads.length
  , type = len==0?'none':rads[0].type
  , radioClick = function(){for(var radios=paulScripts.getSource().parentNode.getElementsByTagName('input').length/2;radios&amp;lt;paulScripts.getSource().parentNode.getElementsByTagName('input').length;radios++){paulScripts.getSource().parentNode.getElementsByTagName('input')[radios].className=myClass + 'Unselected'};paulScripts.getSource().parentNode.getElementsByTagName('input')[paulScripts.getSource().index].click(); paulScripts.getSource().className=myClass + 'Selected'}
  , checkClick= function(){paulScripts.getSource().parentNode.getElementsByTagName('input')[paulScripts.getSource().index].click(); paulScripts.getSource().className=paulScripts.getSource().className==myClass + 'Selected'?myClass + 'Unselected':myClass + 'Selected';}
  , selectAll= function(){ for(var elms=rads.length;elms&amp;gt;rads.length/2;elms--){rads[elms-1].className=myClass + 'Selected'}}
  , deselectAll= function(){ ; for(var elms=rads.length;elms&amp;gt;rads.length/2;elms--){rads[elms-1].className=myClass + 'Unselected'}}
;
  selElm.className = myClass;

  if(type == 'none') return false;

  for(i=0;i&amp;lt;len;i++)
  {
    newOption = document.createElement( 'input');
    newOption.type='button';
    newOption.value=rads[i].getAttribute('dv');
    newOption.className=rads[i].selected?myClass + 'Selected': myClass + 'Unselected';
    newOption.index=i;
    if(type=='checkbox') {addEvent(newOption,'click',checkClick)};
    if(type=='radio') {addEvent(newOption,'click',radioClick)};
    rads[i].parentNode.parentNode.style.display='none';
    selElm.appendChild(newOption );
  }

  if(reprompt) paulScripts.getControl ( promptName ).setValidator(paulScripts.reprompt);

  if(selElmSelect) addEvent(selElmSelect,'click',selectAll);
  if(selElmDeselect) addEvent(selElmDeselect,'click',deselectAll);
}

paulScripts.addButtons('Products','Horizontal',1);

paulScripts.addButtons('Reports','Vertical');
&amp;lt;/script&amp;gt;&lt;/staticValue&gt;
			&lt;/dataSource&gt;
		&lt;/HTMLItem&gt;&lt;/contents&gt;
								&lt;/pageBody&gt;
							&lt;/page&gt;
						&lt;/reportPages&gt;
					&lt;/layout&gt;
				&lt;/layouts&gt;
			&lt;XMLAttributes&gt;&lt;XMLAttribute name=&quot;RS_CreateExtendedDataItems&quot; value=&quot;true&quot; output=&quot;no&quot;/&gt;&lt;XMLAttribute name=&quot;listSeparator&quot; value=&quot;,&quot; output=&quot;no&quot;/&gt;&lt;XMLAttribute name=&quot;RS_modelModificationTime&quot; value=&quot;2008-07-25T15:28:38.133Z&quot; output=&quot;no&quot;/&gt;&lt;/XMLAttributes&gt;&lt;classStyles&gt;&lt;classStyle name=&quot;cls1&quot; label=&quot;Button1&quot;&gt;&lt;CSS value=&quot;padding:2px 10px 3px 10px;margin-right:7px;background-image:url(../reportstyles/images/button_bg.png);background-position:left top;background-repeat:repeat-x;background-color:#CCFFCC;color:#000000;font-size:10pt;font-weight:normal;text-align:center;border:1px solid #92afc2&quot;/&gt;&lt;/classStyle&gt;&lt;/classStyles&gt;&lt;reportName&gt;radios to buttons&lt;/reportName&gt;&lt;queries&gt;&lt;query name=&quot;Query2&quot;&gt;&lt;source&gt;&lt;model/&gt;&lt;/source&gt;&lt;selection&gt;&lt;dataItem name=&quot;Product Types&quot;&gt;&lt;expression&gt;descendants(
#promptmany('Products','mun','[sales_and_marketing].[Products].[Products].[Products]-&amp;gt;:[PC].[@MEMBER].[Products]','set(','',')')#
,[sales_and_marketing].[Products].[Products].[Product type]
)&lt;/expression&gt;&lt;/dataItem&gt;&lt;dataItemMeasure name=&quot;Revenue&quot;&gt;&lt;dmMember&gt;&lt;MUN&gt;[sales_and_marketing].[Measures].[Revenue]&lt;/MUN&gt;&lt;itemCaption&gt;Revenue&lt;/itemCaption&gt;&lt;/dmMember&gt;&lt;dmDimension&gt;&lt;DUN&gt;[sales_and_marketing].[Measures]&lt;/DUN&gt;&lt;itemCaption&gt;Measures&lt;/itemCaption&gt;&lt;/dmDimension&gt;&lt;XMLAttributes&gt;&lt;XMLAttribute name=&quot;RS_dataType&quot; value=&quot;9&quot; output=&quot;no&quot;/&gt;&lt;/XMLAttributes&gt;&lt;/dataItemMeasure&gt;&lt;/selection&gt;&lt;/query&gt;&lt;query name=&quot;Products&quot;&gt;&lt;source&gt;&lt;model/&gt;&lt;/source&gt;&lt;selection&gt;&lt;dataItem name=&quot;Product line&quot; aggregate=&quot;none&quot;&gt;&lt;expression&gt;[sales_and_marketing].[Products].[Products].[Product line]&lt;/expression&gt;&lt;/dataItem&gt;&lt;/selection&gt;&lt;/query&gt;&lt;/queries&gt;&lt;reportVariables&gt;&lt;reportVariable type=&quot;string&quot; name=&quot;ReportType&quot;&gt;
			&lt;reportExpression&gt;ParamValue('ReportType')&lt;/reportExpression&gt;
		&lt;variableValues&gt;&lt;variableValue value=&quot;1&quot;/&gt;&lt;variableValue value=&quot;2&quot;/&gt;&lt;variableValue value=&quot;3&quot;/&gt;&lt;/variableValues&gt;&lt;/reportVariable&gt;&lt;/reportVariables&gt;&lt;/report&gt;
</pre>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/cognospaul.wordpress.com/386/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/cognospaul.wordpress.com/386/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=cognospaul.wordpress.com&#038;blog=15829318&#038;post=386&#038;subd=cognospaul&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://cognospaul.wordpress.com/2013/04/02/button-prompts-in-cognos-10/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/d208fbe0e9af940d869577987d9028c1?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">cognospaul</media:title>
		</media:content>

		<media:content url="http://cognospaul.files.wordpress.com/2013/03/report-with-buttons.png" medium="image">
			<media:title type="html">report with buttons</media:title>
		</media:content>
	</item>
		<item>
		<title>Playing with MotioCI</title>
		<link>http://cognospaul.wordpress.com/2013/03/10/playing-with-motioci/</link>
		<comments>http://cognospaul.wordpress.com/2013/03/10/playing-with-motioci/#comments</comments>
		<pubDate>Sun, 10 Mar 2013 08:00:01 +0000</pubDate>
		<dc:creator>CognosPaul</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://cognospaul.wordpress.com/?p=367</guid>
		<description><![CDATA[A few posts back I gave a sneak peek of a new tool Motio was working on. Recently I was fortunate enough to get into the beta. The installation, for the most part, is fairly straight forward. You download, decompress, modify a few config files to declare which version of Cognos you&#8217;re running, location of [&#8230;]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=cognospaul.wordpress.com&#038;blog=15829318&#038;post=367&#038;subd=cognospaul&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>A few posts back I gave a sneak peek of a new tool Motio was working on. Recently I was fortunate enough to get into the beta.</p>
<p>The installation, for the most part, is fairly straight forward. You download, decompress, modify a few config files to declare which version of Cognos you&#8217;re running, location of your JDK. The only major stumbling block I had was Motio requires some sort of authentication against Cognos. Since I was running Cognos anonymously on my laptop, it simply wouldn&#8217;t connect. To get around this, I set up OpenDJ and was able to progress.</p>
<p>Once MotioCI is installed and set up, it will create an instance. Each instance is a connection to a specific Cognos server. You can have as many instances as you have Cognos gateways. You can communicate between instances. So, for example, you can a report in Instance 1 to get specific results, and compare them to results in Instance 2. This is all part of the assertions, which I will get into later. </p>
<p>After you create an instance, you will be prompted to create a new project. Create the new project with a descriptive name and continue. The wizard will walk you through selecting which folders you want to test against which assertions. It comes with a suite of default assertions created by Motio and the Best Practices team. Once selected, it will generate test cases and run them.</p>
<p><img src="http://cognospaul.files.wordpress.com/2013/10/generate-test-cases.png?w=630&#038;h=398" alt="Generate Test Cases" width="630" height="398" class="aligncenter size-full wp-image-380" /></p>
<p>After the test cases run, you can see which reports have failures or warnings. You can see the results of the test cases, and the outputs of the reports themselves (if the test cases required the reports to run).<br />
<img src="http://cognospaul.files.wordpress.com/2013/10/failing-on-assertions.png?w=630&#038;h=331" alt="failing on assertions" width="630" height="331" class="aligncenter size-full wp-image-381" /><br />
The most interesting part of this tool is the Assertion Studio. This is where you can define the assertions. </p>
<p>Assertions allow you to test almost every aspect of any Cognos object. Do you have a corporate look and feel that every report must follow? Set up a template report and compare each and every report against that. Do you want to find every report that has a run time of more than 5 minutes? Do you want to automatically compare the output of a series of reports against specific SQL queries? Are you upgrading from 8.2 and need to find all instances of the old JS API? Do you want to test your dispatchers for certain settings and response times? The possibilities are endless.</p>
<p>When you design your own assertions you can specify whether the report needs to be executed or not. Executing the report allows you to check things like run time, or results match. Does the third row in the list match the first row of another report? Not executing allows you to use combinations of xpath and regex to parse the report (or model) xml. You might use that to find all reports that contain &#8220;formwarprequest&#8221; in HTML items.</p>
<p>There is a bit of a learning curve when it comes to MotioCI. It is definitely not something you&#8217;d give end users. It does seem to be an invaluable tool for administrators. </p>
<p>You can read more about it at the <a href="http://www.motio.com/products/ci.do" title="Motio website" target="_blank">Motio Website</a>.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/cognospaul.wordpress.com/367/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/cognospaul.wordpress.com/367/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=cognospaul.wordpress.com&#038;blog=15829318&#038;post=367&#038;subd=cognospaul&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://cognospaul.wordpress.com/2013/03/10/playing-with-motioci/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/d208fbe0e9af940d869577987d9028c1?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">cognospaul</media:title>
		</media:content>

		<media:content url="http://cognospaul.files.wordpress.com/2013/10/generate-test-cases.png" medium="image">
			<media:title type="html">Generate Test Cases</media:title>
		</media:content>

		<media:content url="http://cognospaul.files.wordpress.com/2013/10/failing-on-assertions.png" medium="image">
			<media:title type="html">failing on assertions</media:title>
		</media:content>
	</item>
		<item>
		<title>Cognos Mashup Services &#8211; a brief example</title>
		<link>http://cognospaul.wordpress.com/2013/02/18/cognos-mashup-services-a-brief-example/</link>
		<comments>http://cognospaul.wordpress.com/2013/02/18/cognos-mashup-services-a-brief-example/#comments</comments>
		<pubDate>Mon, 18 Feb 2013 05:32:11 +0000</pubDate>
		<dc:creator>CognosPaul</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://cognospaul.wordpress.com/?p=373</guid>
		<description><![CDATA[In a previous post I showed how to embed Cognos reports in other applications or reports by using iframes. Unfortunately there are many problems with using iframes, difficulty interacting with objects with JavaScript, security issues, even positioning objects well into a page. Instead it might be better to use CMS. You can pull a specific [&#8230;]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=cognospaul.wordpress.com&#038;blog=15829318&#038;post=373&#038;subd=cognospaul&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>In a previous post I showed how to embed Cognos reports in other applications or reports by using iframes. Unfortunately there are many problems with using iframes, difficulty interacting with objects with JavaScript, security issues, even positioning objects well into a page.</p>
<p>Instead it might be better to use CMS. You can pull a specific object from the report, and it becomes an actual element of the page you&#8217;re working on. CMS also allows you to pull elements in a number of different formats. HTMLFragment will return the report object exactly as it appears in the report, while JSON will allow you to easily use the data from the report in a JS function. This will post will two examples, HTMLFragment and JSON.</p>
<p>We&#8217;ll start with a JSON example. </p>
<p>In this report, we&#8217;ll create a text box prompt and a list prompt. Typing anything into the text prompt will populate the list prompt, like a search and select, but without refreshing the page. </p>
<p>This example is using Cognos 10.2 and the sales and marketing cube. The JavaScript will not downgrade to previous versions as I&#8217;m using the new Prompt API. People using previous versions can get around it by attaching events to their prompts.</p>
<p>To begin, create a list report with a value and key. In my example I&#8217;m using Product and Product &#8211; Category Code from the Sales and Marketing cube.<br />
<img src="http://cognospaul.files.wordpress.com/2013/02/1-source-list.png?w=630" alt="1. Source list"   class="aligncenter size-full wp-image-375" /></p>
<p>The Product field is actually a filter expression:
<pre class="brush: plain; title: ; notranslate">filter(
  [sales_and_marketing].[Products].[Products].[Product]
  , upper([sales_and_marketing].[Products].[Products].[Product].[Product - Long Name]) contains upper(#prompt('SearchString','string')#)
    or [sales_and_marketing].[Products].[Products].[Product].[Product - Category Code]  contains (#prompt('SearchString','string')#)
)</pre>
<p>As CMS allows us to reference objects directly, it&#8217;s important to remember to give each object a name that describes what it is, what it contains, while being short enough to be easily referenceable . In this case, I&#8217;m calling the list object &#8220;List&#8221;. </p>
<p>When you run the report, you&#8217;re prompted to enter a string, and any product that contains the caption or code will be returned.</p>
<p>Save it under /CMS/Source and create a new report. </p>
<p>This report should have a table with 3 rows, 1 column. In the first row, put a text box prompt. In the second, a multi select list prompt. Leave the third blank for now. Remember to name the text box and value prompts. Let&#8217;s call them Text and Select. </p>
<p>Drag in an HTML item in the bottom row of the table, and paste in the following code.</p>
<pre class="brush: jscript; collapse: true; light: false; title: ; toolbar: true; notranslate">
&lt;script&gt;
/*
 * Fake Namespace and prompt getters.
 */ 	
var paulScripts = {}
var oCR = cognos.Report.getReport(&quot;_THIS_&quot;);

paulScripts.getSource = function()
{
    var targ;
    if (!e) var e = window.event;
    if(!e) return false;
    if (e.target) targ = e.target;
    else if (e.srcElement) targ = e.srcElement;
    if (targ.nodeType == 3) // defeat Safari bug
      targ = targ.parentNode;
    return targ;
}

paulScripts.getControl = function(promptName) 
{
  return oCR.prompt.getControlByName(promptName);
}


paulScripts.setPromptValue = function ( promptName, value ) {
var 
  newOption = ''
  , selElm = document.getElementById('PRMT_SV_'+paulScripts.getControl ( promptName )._id_);
//  selElm.options.length=0;
  for(i=0;i&lt;selElm.options.length;i++)
  {
    if(selElm.options[i].selected==true){
      for(x in value) {if(value[x].use == selElm.options[i].value) {value.splice(x,1); break;}}
    } else {selElm.remove(i);i--}
  }
  
  for(i=0;i&lt;value.length;i++)
  {
    newOption = document.createElement( 'option');
    newOption.value=value [i].use ;
    newOption.innerHTML = value[i].display ;
    newOption.dv = value [i].display ;

    selElm.appendChild(newOption );

  }
}

/*
* This creates the XMLHttpRequest object used to communicate with CMS.
* The initialization of the object depends on what browser is being used. This
* code is compatible with IE 5.5, 6, 7, 8 and all versions of Firefox and Chrome
*
* For more information on the XMLHttpRequest object, see http://www.w3.org/TR/XMLHttpRequest/
*/
try  {
var objXHR = new XMLHttpRequest();
} catch (e) {
try {
var objXHR = new ActiveXObject('Msxml2.XMLHTTP');
} catch (e) {
try {
var objXHR = new ActiveXObject('Microsoft.XMLHTTP');
} catch (e) {
alert('XMLHttpRequest not supported'); }
}
}


paulScripts.getValues = function (searchString)
{
  var 
    searchString = searchString?searchString:'',
    url= '../ibmcognos/cgi-bin/cognos.cgi/rds/reportData/searchPath/%2fcontent%2ffolder%5b%40name%3d%27CMS%27%5d%2freport%5b%40name%3d%27Source%27%5d?fmt=JSON&amp;async=off&amp;selection=List&amp;p_SearchString=' + searchString;
   objXHR.open(&quot;POST&quot;, url, false);
   objXHR.send(null);
   if (objXHR.status == 200)
   {
     dataCache = (eval('(' + objXHR.responseText + ')'));
     return paulScripts.parseJSON(dataCache);
   }
}

/*
 * Loop through tableData, extract the use and display fields, and dump them into 
 * a JS object.
 */
paulScripts.parseJSON = function(tableData)
{
  if(!tableData.filterResultSet.filterResult) return false;
  var 
      rows = tableData.filterResultSet.filterResult[0].reportElement[0].lst.group.row
    , JSONData = [];

  for (var i=0; i &lt; rows.length; i++)
  {
    JSONData.push ( {use :  rows[i].cell[1].item[0].txt.fmtVal, display : rows[i].cell[0].item[0].txt.fmtVal  });
  }
return JSONData;
}


/*
 * function loadOptions. Paul Mendelson - 2013-01-15
 * When text is entered into the text box, this will be triggered. It will wait for further input
 * before loading the select box with values.
 */
paulScripts.loadOptions= (function () {
  var timer;
  return function (){
    var name = this.getName()
    , search = this.getValue();
    clearTimeout(timer);
    timer = window.setTimeout(function() {  
      if(this.oldValue==search) {return true} else {this.oldValue=search}
      paulScripts.setPromptValue( 'Select', paulScripts.getValues(search));
    },1000);
    return true;
    };
})();

paulScripts.getControl('Text').setValidator(paulScripts.loadOptions);

&lt;/script&gt;
</pre>
<p>When you run the report the select box will be empty. Start typing into the textbox. The JS will wait 1 second after the last keystroke, then pass the value to the Source report, retrieve data in JSON format, parse it and populate the select.</p>
<p>I&#8217;m not going to get into all of the JS here, just what is salient to CMS. </p>
<p>The paulScripts.getValues first coalesces the search string into nothing. You can make prompts optional by making your filters &#8220;this = ?searchString? or &#8216;-1&#8242; = ?searchstring?&#8221;, and having the searchString set to &#8216;-1&#8242;. The URL in this example uses the search path of the report. While longer, I find it preferable over using the storeID. Just remember to URL Encode it. Notice the search string is appended to the URL. It then opens an XMLHttpRequest to Cognos. Cognos will interpret the request and send back a responseText. </p>
<p>The responseText will need to be handled differently depending on the format of the request. In this case, Cognos is returning JSON, and the results will need to be parsed as such.</p>
<p>The paulScripts.parseJSON will loop through the rows in the table. I know that the first cell is the label, and the second is the code, I also know there is only a single object in each table cell. </p>
<p>The monster tableData.filterResultSet.filterResult[0].reportElement[0].lst.group.row[1].cell[0].item[0].txt is how we reference text of the first item in the first cell of the second row (indexes are 0 based). If I managed to pull two lists, I could decide to use reportElement[1] to get the second list.</p>
<p>When parseJSON finishes creating the JS object, it will return it to getValues which in turn returns it to setPromptValue.  setPromptValue will loop through the JS object and create the options in the select list.</p>
<p>Now that we have functional prompts. Let&#8217;s create a chart that shows revenue per month for each of the selected products. </p>
<p>Put the Month level in the categories, Revenue in the Measure and a new Query Calculation: <code>filter(<br />
  [sales_and_marketing].[Products].[Products].[Product]<br />
  , [sales_and_marketing].[Products].[Products].[Product].[Product - Category Code]  in (#promptmany('Products','string')#)<br />
)</code></p>
<p>When run, it will prompt for codes.</p>
<p>Now let&#8217;s change the HTML item to:</p>
<pre class="brush: jscript; collapse: true; light: false; title: ; toolbar: true; notranslate">
&lt;div id=&quot;chart&quot;&gt;&lt;/div&gt;
&lt;script&gt;
/*
 * Fake Namespace and prompt getters.
 */ 	
var paulScripts = {}
var oCR = cognos.Report.getReport(&quot;_THIS_&quot;);

paulScripts.getSource = function()
{
    var targ;
    if (!e) var e = window.event;
    if(!e) return false;
    if (e.target) targ = e.target;
    else if (e.srcElement) targ = e.srcElement;
    if (targ.nodeType == 3) // defeat Safari bug
      targ = targ.parentNode;
    return targ;
}

paulScripts.getControl = function(promptName) 
{
  return oCR.prompt.getControlByName(promptName);
}


paulScripts.setPromptValue = function ( promptName, value ) {
var 
  newOption = ''
  , selElm = document.getElementById('PRMT_SV_'+paulScripts.getControl ( promptName )._id_);
//  selElm.options.length=0;
  for(i=0;i&lt;selElm.options.length;i++)
  {
    if(selElm.options[i].selected==true){
      for(x in value) {if(value[x].use == selElm.options[i].value) {value.splice(x,1); break;}}
    } else {selElm.remove(i);i--}
  }
  
  for(i=0;i&lt;value.length;i++)
  {
    newOption = document.createElement( 'option');
    newOption.value=value [i].use ;
    newOption.innerHTML = value[i].display ;
    newOption.dv = value [i].display ;

    selElm.appendChild(newOption );

  }
}

/*
* This creates the XMLHttpRequest object used to communicate with CMS.
* The initialization of the object depends on what browser is being used. This
* code is compatible with IE 5.5, 6, 7, 8 and all versions of Firefox and Chrome
*
* For more information on the XMLHttpRequest object, see http://www.w3.org/TR/XMLHttpRequest/
*/
try  {
var objXHR = new XMLHttpRequest();
} catch (e) {
try {
var objXHR = new ActiveXObject('Msxml2.XMLHTTP');
} catch (e) {
try {
var objXHR = new ActiveXObject('Microsoft.XMLHTTP');
} catch (e) {
alert('XMLHttpRequest not supported'); }
}
}


paulScripts.getValues = function (searchString)
{
  var 
    searchString = searchString?searchString:'',
    url= '../cgi-bin/cognos.cgi/rds/reportData/searchPath/%2fcontent%2ffolder%5b%40name%3d%27CMS%27%5d%2freport%5b%40name%3d%27Source%27%5d?fmt=JSON&amp;async=off&amp;selection=List&amp;p_SearchString=' + searchString;
   objXHR.open(&quot;POST&quot;, url, false);
   objXHR.send(null);
   if (objXHR.status == 200)
   {
     dataCache = (eval('(' + objXHR.responseText + ')'));
     return paulScripts.parseJSON(dataCache);
   }
}

/*
 * Loop through tableData, extract the use and display fields, and dump them into 
 * a JS object.
 */
paulScripts.parseJSON = function(tableData)
{
  if(!tableData.filterResultSet.filterResult) return false;
  var 
      rows = tableData.filterResultSet.filterResult[0].reportElement[0].lst.group.row
    , JSONData = [];

  for (var i=0; i &lt; rows.length; i++)
  {
    JSONData.push ( {use :  rows[i].cell[1].item[0].txt.fmtVal, display : rows[i].cell[0].item[0].txt.fmtVal  });
  }
return JSONData;
}


/*
 * function loadOptions. Paul Mendelson - 2013-01-15
 * When text is entered into the text box, this will be triggered. It will wait for further input
 * before loading the select box with values.
 */
paulScripts.loadOptions= (function () {
  var timer;
  return function (){
    var name = this.getName()
    , search = this.getValue();
    clearTimeout(timer);
    timer = window.setTimeout(function() {  
      if(this.oldValue==search) {return true} else {this.oldValue=search}
      paulScripts.setPromptValue( 'Select', paulScripts.getValues(search));
    },1000);
    return true;
    };
})();

paulScripts.getControl('Text').setValidator(paulScripts.loadOptions);

/*
 * function loadProducts. Paul Mendelson - 2013-01-15
 * When a product is selected in the select, this will be triggered. It will wait for further input
 * before attempting to retrieve the chart.
 */
paulScripts.loadProducts= (function () {
  var timer;
  return function (){
    var name = this.getName()
    , products = this.getValues()
    , productsLabel='';
    clearTimeout(timer);
    timer = window.setTimeout(function() {  
    if(products.length===0) return true;
    for (i=0;i&lt;products.length;i++) {productsLabel+='&amp;p_Products='+products[i].use}
    paulScripts.getChart(productsLabel);
    },1000);
    return true;
    };
})();

paulScripts.getChart = function (products)
{
  var 
    url= '../cgi-bin/cognos.cgi/rds/reportData/searchPath/%2fcontent%2ffolder%5b%40name%3d%27CMS%27%5d%2freport%5b%40name%3d%27Chart%27%5d?fmt=HTMLFragment&amp;async=off&amp;selection=Chart' + products;
   objXHR.open(&quot;POST&quot;, url, false);
   objXHR.send(null);
   if (objXHR.status == 200)
   {
     document.getElementById('chart').innerHTML = objXHR.responseText ;
   }
}

paulScripts.getControl('Select').setValidator(paulScripts.loadProducts);

&lt;/script&gt;
</pre>
<p>A div has been added above the scripts node. A validator for the Select prompt has been added. When the user selects a value it will wait one second for further input, then pass the selected codes to the chart report. The chart report will return an HTMLFragment as a string, which is then passed to the div as it&#8217;s innerHTML. </p>
<p>Cognos Mashup Services is an incredibly versatile tool. The possibilities are limitless. I suspect, but haven&#8217;t tried, that it will allow you to embed objects in systems that do not allow iFrames. The only drawback is that it will only work in HTML. You can&#8217;t use this to merge objects from different models into a single PDF</p>
<p>IBM has a few guides on it. Start <a href="http://www.ibm.com/developerworks/data/library/techarticle/dm-1001cognosmashup/index.html">here</a>.</p>
<p>Report XML:</p>
<pre class="brush: plain; collapse: true; light: false; title: ; toolbar: true; notranslate">
&lt;report xmlns=&quot;http://developer.cognos.com/schemas/report/9.0/&quot; useStyleVersion=&quot;10&quot; expressionLocale=&quot;en-us&quot;&gt;
				&lt;modelPath&gt;/content/folder[@name='Samples']/folder[@name='Cubes']/package[@name='Sales and Marketing (cube)']/model[@name='2008-07-25T15:28:38.072Z']&lt;/modelPath&gt;
				&lt;drillBehavior modelBasedDrillThru=&quot;true&quot;/&gt;
				&lt;layouts&gt;
					&lt;layout&gt;
						&lt;reportPages&gt;
							&lt;page name=&quot;Page1&quot;&gt;
								&lt;style&gt;
									&lt;defaultStyles&gt;
										&lt;defaultStyle refStyle=&quot;pg&quot;/&gt;
									&lt;/defaultStyles&gt;
								&lt;/style&gt;
								&lt;pageBody&gt;
									&lt;style&gt;
										&lt;defaultStyles&gt;
											&lt;defaultStyle refStyle=&quot;pb&quot;/&gt;
										&lt;/defaultStyles&gt;
									&lt;/style&gt;
									&lt;contents&gt;&lt;table&gt;&lt;style&gt;&lt;defaultStyles&gt;&lt;defaultStyle refStyle=&quot;tb&quot;/&gt;&lt;/defaultStyles&gt;&lt;CSS value=&quot;border-collapse:collapse&quot;/&gt;&lt;/style&gt;&lt;tableRows&gt;&lt;tableRow&gt;&lt;tableCells&gt;&lt;tableCell&gt;&lt;contents&gt;&lt;textBox parameter=&quot;Parameter1&quot; name=&quot;Text&quot; required=&quot;false&quot;/&gt;&lt;/contents&gt;&lt;/tableCell&gt;&lt;/tableCells&gt;&lt;/tableRow&gt;&lt;tableRow&gt;&lt;tableCells&gt;&lt;tableCell&gt;&lt;contents&gt;&lt;selectValue parameter=&quot;Parameter2&quot; multiSelect=&quot;true&quot; selectValueUI=&quot;listBox&quot; name=&quot;Select&quot;/&gt;&lt;/contents&gt;&lt;/tableCell&gt;&lt;/tableCells&gt;&lt;/tableRow&gt;&lt;/tableRows&gt;&lt;/table&gt;&lt;HTMLItem description=&quot;scripts&quot;&gt;
			&lt;dataSource&gt;
				&lt;staticValue&gt;&amp;lt;div id=&quot;chart&quot;&amp;gt;&amp;lt;/div&amp;gt;
&amp;lt;script&amp;gt;
/*
 * Fake Namespace and prompt getters.
 */ 	
var paulScripts = {}
var oCR = cognos.Report.getReport(&quot;_THIS_&quot;);

paulScripts.getSource = function()
{
    var targ;
    if (!e) var e = window.event;
    if(!e) return false;
    if (e.target) targ = e.target;
    else if (e.srcElement) targ = e.srcElement;
    if (targ.nodeType == 3) // defeat Safari bug
      targ = targ.parentNode;
    return targ;
}

paulScripts.getControl = function(promptName) 
{
  return oCR.prompt.getControlByName(promptName);
}


paulScripts.setPromptValue = function ( promptName, value ) {
var 
  newOption = ''
  , selElm = document.getElementById('PRMT_SV_'+paulScripts.getControl ( promptName )._id_);
//  selElm.options.length=0;
  for(i=0;i&amp;lt;selElm.options.length;i++)
  {
    if(selElm.options[i].selected==true){
      for(x in value) {if(value[x].use == selElm.options[i].value) {value.splice(x,1); break;}}
    } else {selElm.remove(i);i--}
  }
  
  for(i=0;i&amp;lt;value.length;i++)
  {
    newOption = document.createElement( 'option');
    newOption.value=value [i].use ;
    newOption.innerHTML = value[i].display ;
    newOption.dv = value [i].display ;

    selElm.appendChild(newOption );

  }
}

/*
* This creates the XMLHttpRequest object used to communicate with CMS.
* The initialization of the object depends on what browser is being used. This
* code is compatible with IE 5.5, 6, 7, 8 and all versions of Firefox and Chrome
*
* For more information on the XMLHttpRequest object, see http://www.w3.org/TR/XMLHttpRequest/
*/
try  {
var objXHR = new XMLHttpRequest();
} catch (e) {
try {
var objXHR = new ActiveXObject('Msxml2.XMLHTTP');
} catch (e) {
try {
var objXHR = new ActiveXObject('Microsoft.XMLHTTP');
} catch (e) {
alert('XMLHttpRequest not supported'); }
}
}


paulScripts.getValues = function (searchString)
{
  var 
    searchString = searchString?searchString:'',
    url= '../cgi-bin/cognos.cgi/rds/reportData/searchPath/%2fcontent%2ffolder%5b%40name%3d%27CMS%27%5d%2freport%5b%40name%3d%27Source%27%5d?fmt=JSON&amp;amp;async=off&amp;amp;selection=List&amp;amp;p_SearchString=' + searchString;
   objXHR.open(&quot;POST&quot;, url, false);
   objXHR.send(null);
   if (objXHR.status == 200)
   {
     dataCache = (eval('(' + objXHR.responseText + ')'));
     return paulScripts.parseJSON(dataCache);
   }
}

/*
 * Loop through tableData, extract the use and display fields, and dump them into 
 * a JS object.
 */
paulScripts.parseJSON = function(tableData)
{
  if(!tableData.filterResultSet.filterResult) return false;
  var 
      rows = tableData.filterResultSet.filterResult[0].reportElement[0].lst.group.row
    , JSONData = [];

  for (var i=0; i &amp;lt; rows.length; i++)
  {
    JSONData.push ( {use :  rows[i].cell[1].item[0].txt.fmtVal, display : rows[i].cell[0].item[0].txt.fmtVal  });
  }
return JSONData;
}


/*
 * function loadOptions. Paul Mendelson - 2013-01-15
 * When text is entered into the text box, this will be triggered. It will wait for further input
 * before loading the select box with values.
 */
paulScripts.loadOptions= (function () {
  var timer;
  return function (){
    var name = this.getName()
    , search = this.getValue();
    clearTimeout(timer);
    timer = window.setTimeout(function() {  
      if(this.oldValue==search) {return true} else {this.oldValue=search}
      paulScripts.setPromptValue( 'Select', paulScripts.getValues(search));
    },1000);
    return true;
    };
})();

paulScripts.getControl('Text').setValidator(paulScripts.loadOptions);

/*
 * function loadProducts. Paul Mendelson - 2013-01-15
 * When a product is selected in the select, this will be triggered. It will wait for further input
 * before attempting to retrieve the chart.
 */
paulScripts.loadProducts= (function () {
  var timer;
  return function (){
    var name = this.getName()
    , products = this.getValues()
    , productsLabel='';
    clearTimeout(timer);
    timer = window.setTimeout(function() {  
    if(products.length===0) return true;
    for (i=0;i&amp;lt;products.length;i++) {productsLabel+='&amp;amp;p_Products='+products[i].use}
    paulScripts.getChart(productsLabel);
    },1000);
    return true;
    };
})();

paulScripts.getChart = function (products)
{
  var 
    url= '../cgi-bin/cognos.cgi/rds/reportData/searchPath/%2fcontent%2ffolder%5b%40name%3d%27CMS%27%5d%2freport%5b%40name%3d%27Chart%27%5d?fmt=HTMLFragment&amp;amp;async=off&amp;amp;selection=Chart' + products;
   objXHR.open(&quot;POST&quot;, url, false);
   objXHR.send(null);
   if (objXHR.status == 200)
   {
     document.getElementById('chart').innerHTML = objXHR.responseText ;
   }
}

paulScripts.getControl('Select').setValidator(paulScripts.loadProducts);

&amp;lt;/script&amp;gt;
&lt;/staticValue&gt;
			&lt;/dataSource&gt;
		&lt;/HTMLItem&gt;&lt;/contents&gt;
								&lt;/pageBody&gt;
							&lt;/page&gt;
						&lt;/reportPages&gt;
					&lt;/layout&gt;
				&lt;/layouts&gt;
			&lt;XMLAttributes&gt;&lt;XMLAttribute name=&quot;RS_CreateExtendedDataItems&quot; value=&quot;true&quot; output=&quot;no&quot;/&gt;&lt;XMLAttribute name=&quot;listSeparator&quot; value=&quot;,&quot; output=&quot;no&quot;/&gt;&lt;XMLAttribute name=&quot;RS_modelModificationTime&quot; value=&quot;2008-07-25T15:28:38.133Z&quot; output=&quot;no&quot;/&gt;&lt;/XMLAttributes&gt;&lt;reportName&gt;start2&lt;/reportName&gt;&lt;reportVariables&gt;&lt;reportVariable type=&quot;boolean&quot; name=&quot;dontRender&quot;&gt;
			&lt;reportExpression&gt;1=0&lt;/reportExpression&gt;
			&lt;variableValues&gt;
				&lt;variableValue value=&quot;1&quot;/&gt;
			&lt;/variableValues&gt;
		&lt;/reportVariable&gt;&lt;/reportVariables&gt;&lt;/report&gt;
</pre>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/cognospaul.wordpress.com/373/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/cognospaul.wordpress.com/373/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=cognospaul.wordpress.com&#038;blog=15829318&#038;post=373&#038;subd=cognospaul&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://cognospaul.wordpress.com/2013/02/18/cognos-mashup-services-a-brief-example/feed/</wfw:commentRss>
		<slash:comments>11</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/d208fbe0e9af940d869577987d9028c1?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">cognospaul</media:title>
		</media:content>

		<media:content url="http://cognospaul.files.wordpress.com/2013/02/1-source-list.png" medium="image">
			<media:title type="html">1. Source list</media:title>
		</media:content>
	</item>
		<item>
		<title>Recent Java exploits and Cognos</title>
		<link>http://cognospaul.wordpress.com/2013/01/17/recent-java-exploits-and-cognos/</link>
		<comments>http://cognospaul.wordpress.com/2013/01/17/recent-java-exploits-and-cognos/#comments</comments>
		<pubDate>Thu, 17 Jan 2013 08:47:58 +0000</pubDate>
		<dc:creator>CognosPaul</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://cognospaul.wordpress.com/?p=363</guid>
		<description><![CDATA[Several new Java exploits have recently been uncovered. So far the all of the exploits that IBM has tested against their JDK and JREs have been unsuccessful. As my source in the upper echelons of IBM has said, &#8220;Thus, IBM products shipping the IBM JDK are not vulnerable to this exploit.&#8221; Products that ship the [&#8230;]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=cognospaul.wordpress.com&#038;blog=15829318&#038;post=363&#038;subd=cognospaul&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>Several new Java exploits have recently been uncovered. So far the all of the exploits that IBM has tested against their JDK and JREs have been unsuccessful. As my source in the upper echelons of IBM has said, &#8220;Thus, IBM products shipping the IBM JDK are not vulnerable to this exploit.&#8221;</p>
<p>Products that ship the Oracle JRE may be vulnerable to the exploits, and care should be taken until all of the fixes are released. Remember, nothing is sure until the fix is in.</p>
<p>Please read: <a href="https://www.ibm.com/developerworks/mydeveloperworks/blogs/34c80da0-8974-4ac6-83c1-6b72eab6d13e/entry/january_16_2013_1_25_pm1?lang=en" title="Java Vulnerability Blog, from Tivoli AVP" target="_blank">Java Vulnerability Blog, from Tivoli AVP</a></p>
<p>In general it would be best to stay subscribed to the <a href="https://www-304.ibm.com/connections/blogs/PSIRT/tags/psirtba?lang=en_us" title="IBM Product Security Incident Response Blog" target="_blank">IBM Product Security Incident Response Blog</a> to make sure you have the latest information on any security concerns with IBM products.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/cognospaul.wordpress.com/363/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/cognospaul.wordpress.com/363/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=cognospaul.wordpress.com&#038;blog=15829318&#038;post=363&#038;subd=cognospaul&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://cognospaul.wordpress.com/2013/01/17/recent-java-exploits-and-cognos/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/d208fbe0e9af940d869577987d9028c1?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">cognospaul</media:title>
		</media:content>
	</item>
		<item>
		<title>Review: IBM Cognos Insight</title>
		<link>http://cognospaul.wordpress.com/2012/12/23/review-ibm-cognos-insight/</link>
		<comments>http://cognospaul.wordpress.com/2012/12/23/review-ibm-cognos-insight/#comments</comments>
		<pubDate>Sun, 23 Dec 2012 05:39:05 +0000</pubDate>
		<dc:creator>CognosPaul</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://cognospaul.wordpress.com/?p=360</guid>
		<description><![CDATA[While I&#8217;ve got a bit of experience working with the various Cognos studios, I haven&#8217;t had much chance to play with Insight. Fortunately I have IBM Cognos Insight, by Sanjeev Datta. As a in depth study, it is a bit lacking. The book doesn&#8217;t get into serious detail about the inner workings, effects on the [&#8230;]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=cognospaul.wordpress.com&#038;blog=15829318&#038;post=360&#038;subd=cognospaul&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>While I&#8217;ve got a bit of experience working with the various Cognos studios, I haven&#8217;t had much chance to play with Insight. Fortunately I have IBM Cognos Insight, by Sanjeev Datta. </p>
<p>As a in depth study, it is a bit lacking. The book doesn&#8217;t get into serious detail about the inner workings, effects on the server, nor does it go into detail about every single available function. That is fine however, as the book is not targeted at administrators. The only load balancing the readers of this book need to deal with are in the laundry.</p>
<p>This book is very well suited for analysts &#8211; people who need to actually play with the data, and who need to learn about the tools available to them. As an example, I have a friend who is an internal auditor at a very large port. His days are spent pulling data from different sources into Access and running queries on them. He is not very technically inclined, and has only a rudimentary understanding of SQL. This would be a perfect guide for him.</p>
<p>As a guide, it is split logically in sections. What is BI  and how does it help, installing, configuring, importing the data, and the various ways of manipulating the data. It walks the through each step clearing and succinctly, with screenshots to guide the way. (One small complaint though, I read the book on my black and white Kindle, and there was at least one instance referring to text highlighted in color that I couldn&#8217;t see.) </p>
<p>The meat of the book is where it describes how to design and use your cube. From building the hierarchy to writing custom members, it touches on each area. It shows how you can build TurboIntegrator scripts, and why you would, but unfortunately doesn&#8217;t go into detail. Ultimately this book shows a user how to go from raw data to a complex dashboard that meets the user&#8217;s needs.</p>
<p>To the seasoned veteran of Insight, this book won&#8217;t be so useful. To everyone else, this book is invaluable and will get them to the seasoned part. When working with Insight, keep this book open and you won&#8217;t go wrong.</p>
<p><a href="http://www.packtpub.com/ibm-cognos-insight/book" target="_blank">IBM Cognos Insight</a> was written by Sanjeev Datta, and published by Packt Publishing.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/cognospaul.wordpress.com/360/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/cognospaul.wordpress.com/360/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=cognospaul.wordpress.com&#038;blog=15829318&#038;post=360&#038;subd=cognospaul&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://cognospaul.wordpress.com/2012/12/23/review-ibm-cognos-insight/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/d208fbe0e9af940d869577987d9028c1?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">cognospaul</media:title>
		</media:content>
	</item>
		<item>
		<title>Quickie: Referencing the prompt DOM element with the Cognos 10.2 Prompt API</title>
		<link>http://cognospaul.wordpress.com/2012/12/11/quickie-referencing-the-prompt-dom-element-with-the-cognos-10-2-prompt-api/</link>
		<comments>http://cognospaul.wordpress.com/2012/12/11/quickie-referencing-the-prompt-dom-element-with-the-cognos-10-2-prompt-api/#comments</comments>
		<pubDate>Tue, 11 Dec 2012 09:58:06 +0000</pubDate>
		<dc:creator>CognosPaul</dc:creator>
				<category><![CDATA[Javascript]]></category>

		<guid isPermaLink="false">http://cognospaul.wordpress.com/?p=357</guid>
		<description><![CDATA[With all of the nice things in the new API, there are still a few annoyances. For instance, the functions for adding values only work on textboxes, meaning you can&#8217;t programmatically add and remove elements. You also can&#8217;t easily move things around, or flip switches, or do any of the normal things you would do [&#8230;]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=cognospaul.wordpress.com&#038;blog=15829318&#038;post=357&#038;subd=cognospaul&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>With all of the nice things in the new API, there are still a few annoyances. For instance, the functions for adding values only work on textboxes, meaning you can&#8217;t programmatically add and remove elements. You also can&#8217;t easily move things around, or flip switches, or do any of the normal things you would do with Javascript.</p>
<p>Poking through the JS files, I did find a few things that should make life easier. Today I had an issue where I had to make a value prompt to allowing users the choice of viewing the report YTD or for the entire year. The cube has a nice hierarchy for that, with the captions yes/no or the all level for everything (yes, I know the cube could have been designed so that the No choice shows the entire year, this is a post about JS not OLAP so shush). The issue is that the users want to select &#8220;Everything&#8221; or &#8220;Until December 11&#8243;. The everything choice is fairly easy, it&#8217;s a static choice with the display set to &#8220;Everything&#8221;. The &#8220;Until December 11&#8243; is more difficult, the caption should change every day. Instead of altering the cube to put in a dynamic caption, I opted to use another static choice (this way I don&#8217;t need to go to the cube at all), and change the option text with JS. </p>
<p>In order to do this, I need to find the prompt on the page. The ID for the prompt itself is &#8220;PRMT_N19F64920x0B67C9E4RS&#8221; but that looks like it will change every time the report is run, how can I guarantee that I will always be able to access that. Keep in mind that I&#8217;m incredibly lazy, and don&#8217;t want to spend the time wrapping the prompt with my own uniquely identified div (because then I&#8217;d have to keep track of all of the div IDs, and make sure to move the HTML items when I move the prompt and it&#8217;s just too much of a hassle). Surely there must be an easier way.</p>
<p>It turns out that you can get the ID of the prompt with the Prompt API:</p>
<pre class="brush: jscript; title: ; notranslate">
var acme = {};
acme.getControl = function(promptName)
{
  var ocr = cognos.Report.getReport(&quot;_THIS_&quot;);
  return ocr.prompt.getControlByName(promptName);
};
alert(acme.getControl('FilterType')._id_);
</pre>
<p>That would return N19F64920x0B67C9E4RS.</p>
<p>So that means that we can very easily modify the text of the prompt:</p>
<pre class="brush: jscript; title: ; notranslate">
&lt;script&gt;
var acme = {};
acme.getControl = function(promptName)
{
  var ocr = cognos.Report.getReport(&quot;_THIS_&quot;);
  return ocr.prompt.getControlByName(promptName);
};

Date.prototype.getMonthName = function() {
  var monthNames = [ 'January','February','March','April','May','June','July','August','September','October','November','December'];
  return monthNames[this.getMonth()];
}

var dt = new Date(), 
    dtCaption = 'Until ' + dt.getMonthName() + ' ' + dt.getDate();

document.getElementById('PRMT_' + acme.getControl('FilterType')._id_).getElementsByTagName('OPTION')[1].dv = dtCaption;
document.getElementById('PRMT_' + acme.getControl('FilterType')._id_).getElementsByTagName('OPTION')[1].innerHTML = dtCaption;
&lt;/script&gt;
</pre>
<p>This will change the display value (dv) and the label (innerHTML) with Until December 11 (or whatever the current date is).</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/cognospaul.wordpress.com/357/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/cognospaul.wordpress.com/357/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=cognospaul.wordpress.com&#038;blog=15829318&#038;post=357&#038;subd=cognospaul&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://cognospaul.wordpress.com/2012/12/11/quickie-referencing-the-prompt-dom-element-with-the-cognos-10-2-prompt-api/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/d208fbe0e9af940d869577987d9028c1?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">cognospaul</media:title>
		</media:content>
	</item>
		<item>
		<title>Quickie: Changing default option in a Select and Search Prompt</title>
		<link>http://cognospaul.wordpress.com/2012/11/25/quickie-changing-default-option-in-a-select-and-search-prompt/</link>
		<comments>http://cognospaul.wordpress.com/2012/11/25/quickie-changing-default-option-in-a-select-and-search-prompt/#comments</comments>
		<pubDate>Sun, 25 Nov 2012 08:52:24 +0000</pubDate>
		<dc:creator>CognosPaul</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://cognospaul.wordpress.com/?p=355</guid>
		<description><![CDATA[I&#8217;ve been somewhat negligent in responding to the comments lately. One of the most common questions appears to be how to change the default option in a select and search prompt. The following should work for all versions of Cognos. Put an HTML item before the prompt, with the expression: Now put another HTML item [&#8230;]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=cognospaul.wordpress.com&#038;blog=15829318&#038;post=355&#038;subd=cognospaul&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>I&#8217;ve been somewhat negligent in responding to the comments lately. One of the most common questions appears to be how to change the default option in a select and search prompt. </p>
<p>The following should work for all versions of Cognos.</p>
<p>Put an HTML item before the prompt, with the expression:</p>
<pre class="brush: xml; title: ; notranslate">
&lt;div id=&quot;mySnS&quot;&gt;
</pre>
<p>Now put another HTML item after the prompt with the expression:</p>
<pre class="brush: xml; title: ; notranslate">
&lt;/div&gt;
&lt;script&gt;
/* Select and search options
 * 2 - Starts with any of these keywords * DEFAULT
 * 3 - Starts with the first keyword and contains all of the remaining keywords 
 * 4 - Contains any of these keywords 
 * 5 - Contains all of these keywords 
 */
document.getElementById('mySnS').getElementsByTagName('input')[5].click();
&lt;/script&gt;</pre>
<p>The script will locate the mySnS element that surrounds the prompt, generate an array of the input tags, and click() on the one specified. In the example, 5 is selected so it will click on the sixth element (0 based array).</p>
<p>Going through the Cognos JavaScript files, it looks like there is supposed to be a function in the new Prompt API that would let you do it in an easier manner, unfortunately it appears to be an incomplete function, maybe it will be released in the new fixpack. </p>
<p>In theory, you should be able to do something like the following:</p>
<pre class="brush: jscript; title: ; notranslate">
var acme = {};
acme.getControl = function(promptName) 
{
  var ocr = cognos.Report.getReport(&quot;_THIS_&quot;);
  return ocr.prompt.getControlByName(promptName);
};

acme.getControl('mySnS2').setProperty( &quot;caseInsensitive&quot;, false);
acme.getControl('mySnS2').setProperty( &quot;searchType&quot;, &quot;containsAny&quot;);
</pre>
<p>But, as I said, the function doesn&#8217;t appear to be complete in this version. Use the other method for now.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/cognospaul.wordpress.com/355/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/cognospaul.wordpress.com/355/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=cognospaul.wordpress.com&#038;blog=15829318&#038;post=355&#038;subd=cognospaul&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://cognospaul.wordpress.com/2012/11/25/quickie-changing-default-option-in-a-select-and-search-prompt/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/d208fbe0e9af940d869577987d9028c1?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">cognospaul</media:title>
		</media:content>
	</item>
		<item>
		<title>Blatant self promotion</title>
		<link>http://cognospaul.wordpress.com/2012/11/08/blatant-self-promotion/</link>
		<comments>http://cognospaul.wordpress.com/2012/11/08/blatant-self-promotion/#comments</comments>
		<pubDate>Thu, 08 Nov 2012 11:28:34 +0000</pubDate>
		<dc:creator>CognosPaul</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://cognospaul.wordpress.com/?p=277</guid>
		<description><![CDATA[As I wrap up some of my existing contracts, I realize I have some spare time coming up. Far be it from me to goof off in my spare time (the alternative being cleaning and other house work, and I can&#8217;t let the wife get used to that idea), I&#8217;d much rather be solving problems [&#8230;]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=cognospaul.wordpress.com&#038;blog=15829318&#038;post=277&#038;subd=cognospaul&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>As I wrap up some of my existing contracts, I realize I have some spare time coming up. Far be it from me to goof off in my spare time (the alternative being cleaning and other house work, and I can&#8217;t let the wife get used to that idea), I&#8217;d much rather be solving problems people are having with their Cognos set up.</p>
<p>So, does your company need help building that new dashboard for the CFO? Are the reports running too slowly over your new OLAP server? Does JavaScript make your brains leak out? Drop me a line at <a href="mailto:cognospaul@gmail.com">cognospaul@gmail.com</a> and we can come to an arrangement.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/cognospaul.wordpress.com/277/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/cognospaul.wordpress.com/277/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=cognospaul.wordpress.com&#038;blog=15829318&#038;post=277&#038;subd=cognospaul&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://cognospaul.wordpress.com/2012/11/08/blatant-self-promotion/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/d208fbe0e9af940d869577987d9028c1?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">cognospaul</media:title>
		</media:content>
	</item>
		<item>
		<title>Cognos Prompt API</title>
		<link>http://cognospaul.wordpress.com/2012/11/05/cognos-prompt-api/</link>
		<comments>http://cognospaul.wordpress.com/2012/11/05/cognos-prompt-api/#comments</comments>
		<pubDate>Mon, 05 Nov 2012 12:05:53 +0000</pubDate>
		<dc:creator>CognosPaul</dc:creator>
				<category><![CDATA[10]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[iod]]></category>
		<category><![CDATA[prompt api]]></category>

		<guid isPermaLink="false">http://cognospaul.wordpress.com/?p=345</guid>
		<description><![CDATA[Well, it’s been a week since I’ve returned from the IOD, and I’m almost fully recovered from the jet-lag. I had an absolute blast, and am looking forward to going back next year. I promised more details on the various booths that I went to, and I do have the various papers that they gave [&#8230;]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=cognospaul.wordpress.com&#038;blog=15829318&#038;post=345&#038;subd=cognospaul&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>Well, it’s been a week since I’ve returned from the IOD, and I’m almost fully recovered from the jet-lag. I had an absolute blast, and am looking forward to going back next year. </p>
<p>I promised more details on the various booths that I went to, and I do have the various papers that they gave me. I will eventually get to them! But before I do, this is what I started writing while I was at the IOD, but only now am I getting around to actually publishing it. </p>
<p>One of the most exciting new features in Cognos 10.2 is the introduction of a standardized prompt api. No longer will developers have to scramble to try to figure out how to get validate prompts at run time. Or how to repopulate them as needed through other interactions. </p>
<p>IBM has released a standard set of functions, and has even released a few samples containing them. The goal in this post is to learn how to use the new API and maybe to redo a few challenges I’ve had previously. </p>
<p>Just as previous version required a bit of JavaScript to prepare your page for playing with the prompt objects, this version is no different. What is different, is that instead of having to memorize the entire fW formWarpRequest nonsense, now it’s a much simpler:</p>
<pre class="brush: jscript; title: ; notranslate">
var acme = {};
acme.getControl = function(promptName) 
{
  var ocr = cognos.Report.getReport(&quot;_THIS_&quot;);
  return ocr.prompt.getControlByName(promptName);
};
</pre>
<p>The acme namespace is to prevent function conflicts with existing Cognos functions, just preface all functions with that and you’ll be good. The “_THIS_” will automatically be replaced with the correct Cognos Namespace, so your JavaScript should still work if you’re running the report from Report Studio or the Cognos Connection. This never ever needs to change, so just copy and paste the above (although employees of Acme Inc  may want to change the fictious namespace). This solution was shamelessly ripped from Rick Blackwell’s wonderful session at the IOD. All credit for anything and everything related to Cognos and JavaScript should obviously go to him now. </p>
<p>To begin with, let’s use Rick’s standard example for Postal Code validation. </p>
<pre class="brush: jscript; title: ; notranslate"> 	/*
	 *
	 * This function will associate a validation function with the prompt control called promptPostalCode
	 *
	 */
	asdf.assignValidator = function ( ) {
		// Create the report object
		oCR = cognos.Report.getReport( &quot;_THIS_&quot; );

		// Create an array of prompt controls
		// This object is used in both functions in this script.
		asdf.promptControlPostalCode = oCR.prompt.getControlByName(&quot;promptPostalCode&quot;);

		// Make sure we have a valid Postal Code in the format &quot;ana nan&quot; such as K3F 5F4
		asdf.promptControlPostalCode.setValidator(asdf.postalCodeValidator);

	};


	/*
	 *
	 * This function is called for each character entered by the user.
	 * Ensure the value is a valid Postal Code (ie. A1A 1A1 with spaces) using RegEx.
	 *
	 */
	asdf.postalCodeValidator = function(promptValue) {
		//promptValue is an array of 1 value

		// If a value has been entered by the user ensure it matches the pattern
		if (promptValue.length &gt; 0) {
			var rePostalCodeFormat = new RegExp(&quot;[a-z][0-9][a-z] [0-9][a-z][0-9]&quot;, &quot;gi&quot; );
			if ( rePostalCodeFormat.test(promptValue[0].use) ) {
				return true;
			} else {
			    return false;
			}
		} else {
		 	// If the prompt contains no value it is valid.
			// This is important as the prompt and filter are optional
			return true;
		}
	};</pre>
<p>His example is a bit complicated, but it’s good to demonstrate the capabilities. </p>
<p>The first function finds the promptPostalCode prompt, and assigns the validator. Now when a user enters a value, it will trigger the validator function, passing the entered value.<br />
The second function will take the entered value compare it against the regex, and return a true/false, telling Cognos whether the finish button should be active, and if there should be a red underline in the prompt object.</p>
<p>Of course, this is not the only thing that can be done with the validator function. The validator gives us an easy to use onchange function for the prompts. </p>
<p>A few of my clients want tree prompts which automatically hides after a user has selects a member. Previously, there were a few was this could be accomplished, each of them more difficult than the last. But now, instead of using the JS to validate, I can use the validate function to hide the prompt after a few seconds. </p>
<p>First I create an HTML item containing span with an ID:</p>
<pre class="brush: xml; title: ; notranslate">&lt;span id=&quot;treeLabel&quot; onclick=&quot;acme.toggleTree()&quot;&gt;Tree Prompt&lt;/span&gt;</pre>
<p>Next, I wrap the tree prompt inside a span with boxtype set to none:</p>
<pre class="brush: xml; title: ; notranslate">
&lt;span id=&quot;treePrompt&quot; style=&quot;display:none&quot;&gt;

&lt;/span&gt;
</pre>
<p>First a function to directly toggle the display of the tree prompt:</p>
<pre class="brush: jscript; title: ; notranslate">
acme.toggleTree = function()
{
document.getElementById('treeprompt').style.display=document.getElementById('treeprompt').style.display=='none'?'block':'none';
}
</pre>
<p>Next, the actual validation function:</p>
<pre class="brush: jscript; title: ; notranslate">
/*
 * function hideTree. Paul Mendelson - 2012-10-22
 * Whenever a tree node is clicked, it will wait {acme.hideTimer} seconds before hiding
 * the tree. If another selection is made, it will restart the counter.
 */
acme.hideTree= (function () {
  var timer;
  var elm;
  return function (){
    clearTimeout(timer);
  var promptName = this.getName();

    //standard way of determing source of click.
    var targ;
    if (!e) var e = window.event;
    if(!e) return false;
    if (e.target) targ = e.target;
    else if (e.srcElement) targ = e.srcElement;
    if (targ.nodeType == 3) // defeat Safari bug
      targ = targ.parentNode;

    timer = window.setTimeout(function() {  
      document.getElementById('treePrompt').style.display='none';
      document.getElementById('treeLabel').innerHTML = acme.getControl('Time').getValues()[0].display;
    },acme.hideTimer);
    return true;
    };
})();
</pre>
<p>Notice that it’s not actually doing any validation; it’s simply returning true. Notice that it’s also sending the label of the selected node to the tree label. Ultimately the new Prompt API makes it significantly easier to build complex reports.</p>
<p>Example XML:</p>
<pre class="brush: xml; collapse: true; light: false; title: ; toolbar: true; notranslate">
&lt;report xmlns=&quot;http://developer.cognos.com/schemas/report/9.0/&quot; useStyleVersion=&quot;10&quot; expressionLocale=&quot;en-us&quot;&gt;
				&lt;modelPath&gt;/content/folder[@name='Samples']/folder[@name='Cubes']/package[@name='Sales and Marketing (cube)']/model[@name='2008-07-25T15:28:38.072Z']&lt;/modelPath&gt;
				&lt;drillBehavior modelBasedDrillThru=&quot;true&quot;/&gt;
				&lt;layouts&gt;
					&lt;layout&gt;
						&lt;reportPages&gt;
							&lt;page name=&quot;Page1&quot;&gt;
								&lt;style&gt;
									&lt;defaultStyles&gt;
										&lt;defaultStyle refStyle=&quot;pg&quot;/&gt;
									&lt;/defaultStyles&gt;
								&lt;/style&gt;
								&lt;pageBody&gt;
									&lt;style&gt;
										&lt;defaultStyles&gt;
											&lt;defaultStyle refStyle=&quot;pb&quot;/&gt;
										&lt;/defaultStyles&gt;
									&lt;/style&gt;
									&lt;contents&gt;&lt;textBox parameter=&quot;Parameter1&quot; name=&quot;textBox&quot; multiSelect=&quot;true&quot;/&gt;&lt;HTMLItem description=&quot;Label&quot;&gt;
			&lt;dataSource&gt;
				&lt;staticValue&gt;&amp;lt;span id=&quot;treeLabel&quot; onclick=&quot;acme.toggleTree()&quot;&amp;gt;Tree Prompt&amp;lt;/span&amp;gt;
&amp;lt;span id=&quot;treePrompt&quot; style=&quot;display:none&quot;&amp;gt;&lt;/staticValue&gt;
			&lt;/dataSource&gt;
		&lt;/HTMLItem&gt;&lt;selectWithTree parameter=&quot;Time&quot; refQuery=&quot;Time&quot; name=&quot;Time&quot;&gt;&lt;selectWithTreeItem refDataItem=&quot;Time&quot;/&gt;&lt;/selectWithTree&gt;&lt;HTMLItem description=&quot;scripts&quot;&gt;
			&lt;dataSource&gt;
				&lt;staticValue&gt;&amp;lt;/span&amp;gt;
	
&amp;lt;script&amp;gt;



/*
 * Fictious Namespace and getter. Don't change these unless IBM says so or you know what you're doing.
 * acme is now the official standard fictious namespace (thanks Rick), so make sure all functions sit there.
 * This is based on the samples, so I'm giving all credit to Rick Blackwell of IBM.
 */
var acme = {};
acme.getControl = function(promptName) 
{
  var ocr = cognos.Report.getReport(&quot;_THIS_&quot;);
  return ocr.prompt.getControlByName(promptName);
};

/*
 * Global Params
 * Paul Mendelson 2012-28-10
 * These control the behaviour of the functions below. 
 */

//Time in miliseconds to wait before prompt disappears.
acme.hideTimer = 1000;


/*
 *  This will return any available methods or functions or whatever available on the referenced object.
 */ 
function getMethods(myObject)
{
  var funcs=[]
  for(var name in myObject)
  {
    funcs.push(name)
  }
  return  funcs.join(', ');
}

/*
 * Hide the prompt when validating
 */

/*
 * function hideTree. Paul Mendelson - 2012-10-22
 * Whenever a tree node is clicked, it will wait {acme.hideTimer} seconds before hiding
 * the tree. If another selection is made, it will restart the counter.
 */
acme.hideTree= (function () {
  var timer;
  var elm;
  return function (){
    clearTimeout(timer);
  var promptName = this.getName();

    //standard way of determing source of click.
    var targ;
    if (!e) var e = window.event;
    if(!e) return false;
    if (e.target) targ = e.target;
    else if (e.srcElement) targ = e.srcElement;
    if (targ.nodeType == 3) // defeat Safari bug
      targ = targ.parentNode;

    timer = window.setTimeout(function() {  
      document.getElementById('treePrompt').style.display='none';
      document.getElementById('treeLabel').innerHTML = acme.getControl('Time').getValues()[0].display;
    },acme.hideTimer);
    return true;
    };
})();

acme.toggleTree = function()
{
  document.getElementById('treeprompt').style.display=document.getElementById('treeprompt').style.display=='none'?'block':'none'
}



/*acme.checkPostalCode = function()
{
  var rePostalCodeFormat = new RegExp( &quot;[a-z][0-9][a-z] [0-9][a-z][0-9]&quot;, &quot;gi&quot; );
  if(rePostalCodeFormat.test(this.getValue())) return true;
  return false;
}
*/
acme.checkPostalCode = function()
{
  var rePostalCodeFormat = new RegExp( '^[0-9]{0,3}$', &quot;gi&quot; );
  if(rePostalCodeFormat.test(this.getValue())) return true;
  return false;
}
acme.getControl('textBox').setValidator(acme.checkPostalCode);
acme.getControl('Time').setValidator(acme.hideTree);
&amp;lt;/script&amp;gt;

&lt;/staticValue&gt;
			&lt;/dataSource&gt;
		&lt;/HTMLItem&gt;&lt;/contents&gt;
								&lt;/pageBody&gt;
							&lt;/page&gt;
						&lt;/reportPages&gt;
					&lt;/layout&gt;
				&lt;/layouts&gt;
			&lt;XMLAttributes&gt;&lt;XMLAttribute name=&quot;RS_CreateExtendedDataItems&quot; value=&quot;false&quot; output=&quot;no&quot;/&gt;&lt;XMLAttribute name=&quot;listSeparator&quot; value=&quot;,&quot; output=&quot;no&quot;/&gt;&lt;XMLAttribute name=&quot;RS_modelModificationTime&quot; value=&quot;2008-07-25T15:28:38.133Z&quot; output=&quot;no&quot;/&gt;&lt;/XMLAttributes&gt;&lt;queries&gt;&lt;query name=&quot;Time&quot;&gt;&lt;source&gt;&lt;model/&gt;&lt;/source&gt;&lt;selection&gt;&lt;dataItem name=&quot;Time&quot; aggregate=&quot;none&quot;&gt;&lt;expression&gt;rootMembers([sales_and_marketing].[Time].[Time])&lt;/expression&gt;&lt;/dataItem&gt;&lt;/selection&gt;&lt;/query&gt;&lt;/queries&gt;&lt;reportName&gt;Paul - Tree prompt&lt;/reportName&gt;&lt;/report&gt;</pre>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/cognospaul.wordpress.com/345/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/cognospaul.wordpress.com/345/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=cognospaul.wordpress.com&#038;blog=15829318&#038;post=345&#038;subd=cognospaul&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://cognospaul.wordpress.com/2012/11/05/cognos-prompt-api/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/d208fbe0e9af940d869577987d9028c1?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">cognospaul</media:title>
		</media:content>
	</item>
	</channel>
</rss>
