suppressoptions.js 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. // Licensed Materials - Property of IBM
  2. //
  3. // IBM Cognos Products: pps
  4. //
  5. // (C) Copyright IBM Corp. 2005, 2017
  6. //
  7. // US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
  8. // This forms the javascript functions used for the display options
  9. // action pane for PowerPlay Studio.
  10. // The functions are Internet Explorer specific.
  11. function init() {
  12. topparent.openActionPane();
  13. // adjust the size of the action pane to accomodate the display option pane.
  14. topparent.setActionPaneHeight("170");
  15. ContextMenu.initialize(true,false);
  16. }
  17. function applySuppressOptions(forceClose)
  18. {
  19. if (forceClose)
  20. topparent.clearActionPane();
  21. var optionsValue = 0;
  22. // Zero values - 1
  23. // Division by zero - 2
  24. // Missing values - 4
  25. // Overflow values - 8
  26. var suppressZeroValues = document.getElementById("zero");
  27. if( suppressZeroValues.checked )
  28. optionsValue += 1;
  29. var suppressDivisionByZero = document.getElementById("dividebyzero");
  30. if( suppressDivisionByZero.checked )
  31. optionsValue += 2;
  32. var suppressMissingValues = document.getElementById("missing");
  33. if( suppressMissingValues.checked )
  34. optionsValue += 4;
  35. var suppressOverflowValues = document.getElementById("overflow");
  36. if( suppressOverflowValues.checked )
  37. optionsValue += 8;
  38. command = "UO:" + optionsValue;
  39. //alert( command );
  40. topparent.getXtabFrame().doit(command);
  41. }
  42. function onOK() {
  43. applySuppressOptions(true)
  44. }