/content/folder[@name='Samples']/folder[@name='Cubes']/package[@name='Sales and Marketing (cube)']/model[@name='2008-07-25T15:28:38.072Z'][sales_and_marketing].[Time].[Time].[Month][sales_and_marketing].[Products].[Products].[Product][sales_and_marketing].[Measures].[Revenue][sales_and_marketing].[Time].[Time].[Year][sales_and_marketing].[Products].[Products].[Product line][sales_and_marketing].[Time].[Time].[Quarter][sales_and_marketing].[Products].[Products].[Product type][sales_and_marketing].[Time].[Time].[Year] = ?Year?[sales_and_marketing].[Time].[Time].[Year]
<script>
var paulScripts = {}
, win=window['oCV'+'_THIS_'];
paulScripts.oCV = win.getRV().getCV();
/* paulScripts.freezeContainer
* Paul Mendelson - 2014-03-25
* in: objectName {string - name of the data container}
* This will find the crosstab or list, based on the object name, and unfreeze the columns and rows.
*/
paulScripts.freezeContainer = function(objectName){
var pFMngr = paulScripts.oCV.getPinFreezeManager();
pFMngr.freezeContainer(objectName,true,true);
window.onResizeViewerEvent()
};
/* paulScripts.unfreezeContainer
* Paul Mendelson - 2014-03-25
* in: objectName {string - name of the data container}
* This will find the crosstab or list, based on the object name, and unfreeze the columns and rows.
*/
paulScripts.unfreezeContainer = function(objectName){
var pFMngr = paulScripts.oCV.getPinFreezeManager();
pFMngr.freezeContainer(objectName,false,false);
};
/* paulScripts.freezeAll
* Paul Mendelson - 2014-03-25
* in: type {string - crosstab or list}
* This wil loop through every "type" on the page, freezing columns and rows
*/
paulScripts.freezeAll = function(type){
var xts = win._getContainers(type)
, xtLen = xts.length
, pFMngr = paulScripts.oCV.getPinFreezeManager();
for(var i =0;i<xtLen;++i){
var lid = pFMngr.removeNamespace(xts[i].getAttribute('lid'));
if(pFMngr.hasFrozenColumnHeadings(lid)) continue;
paulScripts.freezeContainer (lid);
}
};
/* paulScripts.unfreezeAll
* Paul Mendelson - 2014-03-25
* in: type {string - crosstab or list}
* This wil loop through every "type" on the page, unfreezing columns and rows
*/
paulScripts.unfreezeAll = function(type){
var xts = win._getContainers(type)
, xtLen = xts.length
, pFMngr = paulScripts.oCV.getPinFreezeManager();
for(var i =0;i<xtLen;++i){
var lid = pFMngr.removeNamespace(xts[i].getAttribute('lid'));
paulScripts.unfreezeContainer (lid);
}
};
/* paulScripts.toggleContainer
* Paul Mendelson - 2014-03-25
* This wil check if a container has frozen headers. If so, it unfreezes it, if not, it freezes the container.
*/
paulScripts.toggleContainer = function(objectName) {
var pFMngr = paulScripts.oCV.getPinFreezeManager();
if(pFMngr.hasFrozenColumnHeadings(objectName)) {
paulScripts.unfreezeContainer (objectName);
}
else {
paulScripts.freezeContainer (objectName);
window.onResizeViewerEvent()
}
}
/* paulScripts.toggleAll
* Paul Mendelson - 2014-03-25
* in: type {string - crosstab or list}
* This wil loop through every "type" on the page, and freezing or unfreezing, depending if the column header is frozen.
*/
paulScripts.toggleAll = function(type) {
setTimeout(function(){
var xts = win._getContainers(type)
, xtLen = xts.length
, pFMngr = paulScripts.oCV.getPinFreezeManager();
for(var i =0;i<xtLen;++i){
var lid = pFMngr.removeNamespace(xts[i].getAttribute('lid'));
if(i<xtLen-1 && lid==pFMngr.removeNamespace(xts[i+1].getAttribute('lid'))) continue; //when the panes are frozen the crosstab is split into four elements, all with the same lid. Without this hack, the xtab would toggle four times!
if(pFMngr.hasFrozenColumnHeadings(lid)) {
paulScripts.unfreezeContainer(lid);
}
else {
paulScripts.freezeContainer(lid);
window.onResizeViewerEvent()
}
}
}
,200);
}
paulScripts.freezeAll('crosstab');
</script>
<input type="button" onclick="paulScripts.toggleAll('crosstab');paulScripts.toggleAll('list');" value="Toggle"/>