/content/folder[@name='Samples']/folder[@name='Cubes']/package[@name='Sales and Marketing (cube)']/model[@name='2008-07-25T15:28:38.072Z']
#promptmany('ProductsSet','mun','[sales_and_marketing].[Products].[Products].[Product line]','hierarchize(union([sales_and_marketing].[Products].[Products].[Product line],descendants(set(','[sales_and_marketing].[Products].[Products]',')
,1)
))')#roleValue('_memberUniqueName',[Product line])count(1 within set children(currentMember([sales_and_marketing].[Products].[Products])))[sales_and_marketing].[Measures].[Revenue]#promptmany('YearSet','mun','[sales_and_marketing].[Time].[Time].[Year]','hierarchize(union([sales_and_marketing].[Time].[Time].[Year],descendants(set(','[sales_and_marketing].[Time].[Time]',')
,1)
))')#roleValue('_memberUniqueName',[Year])count(1 within set children(currentMember([sales_and_marketing].[Time].[Time])))
<script>
var paulScripts = {}
, oCR = cognos.Report.getReport("THIS")
, ocv = eval("oCV" + "_THIS_").getRV().getCV();
paulScripts.getControl = function(promptName) {
return oCR.prompt.getControlByName(promptName);
};
function getMethods(myObject)
{
var funcs=[]
for(var name in myObject)
{
funcs.push(name)
}
return funcs.join(', ');
}
paulScripts.getSelMuns= function(){
var selLength =ocv.getSelectionController().getSelections().length
, myObj=[];
if(!selLength) return false;
for (i=0;i<selLength;++i){
myObj.push({
'mun':ocv.getSelectionController().getSelections()[i].getMuns()[0][0],
'dataItem':ocv.getSelectionController().getSelections()[i].getDataItems()[0][0]});
};
return(myObj);
}
paulScripts.passMunsToPrompt = function(){
var obj = paulScripts.getSelMuns()
, objLen = obj.length;
for(var i=0;i<objLen ;++i){
paulScripts.getControl(obj[i].dataItem).addValues([{'use':obj[i].mun}]);
}
}
paulScripts.passMunsToPromptCompat = function(promptName,mun){
paulScripts.getControl(promptName).addValues([{'use':mun}]);
}
paulScripts.removeMunsFromPrompt= function(){
var obj = paulScripts.getSelMuns()
, objLen = obj.length
, updatedPrompts=[];
for(var i=0;i<objLen ;++i){
for( var j=0;j<paulScripts.getControl(obj[i].dataItem).getValues().length;++j){
if(paulScripts.getControl(obj[i].dataItem).getValues()[j].use == obj[i].mun) {continue;}
else {updatedPrompts.push(paulScripts.getControl(obj[i].dataItem).getValues()[j])}
}
paulScripts.getControl(obj[i].dataItem).setValues(updatedPrompts);
}
}
paulScripts.removeMunsFromPromptCompat= function(promptName,mun){
var updatedPrompts=[];
for( var j=0;j<paulScripts.getControl(promptName).getValues().length;++j){
if(paulScripts.getControl(promptName).getValues()[j].use == mun) {continue;}
else {updatedPrompts.push(paulScripts.getControl(promptName).getValues()[j])}
}
paulScripts.getControl(promptName).setValues(updatedPrompts);
}
</script>
<div style="display:none">
</div>
No Data Available
case when [Query1].[PLChildren] = 0 then '' else
case when ParamDisplayValue('ProductsSet') contains ([Query1].[PLMun])
then '<input type="button" onclick="
paulScripts.removeMunsFromPromptCompat(''Product line'','''+[Query1].[PLMun]+''');
oCR.sendRequest(cognos.Report.Action.FINISH);
"
value="-"
>'
else '<input type="button" onclick="
paulScripts.passMunsToPromptCompat(''Product line'','''+[Query1].[PLMun]+''');
oCR.sendRequest(cognos.Report.Action.FINISH);
"
value="+">'
end
end
case when [Query1].[YearChildren] = 0 then '' else
case when ParamDisplayValue('YearSet') contains ([Query1].[YearMun])
then '<input type="button" onclick="
paulScripts.removeMunsFromPromptCompat(''Year'','''+[Query1].[YearMun]+''');
oCR.sendRequest(cognos.Report.Action.FINISH);
"
value="-"
>'
else '<input type="button" onclick="
paulScripts.passMunsToPromptCompat(''Year'','''+[Query1].[YearMun]+''');
oCR.sendRequest(cognos.Report.Action.FINISH);
"
value="+">'
end
end
Expand Collapse