Hello Cognos masters!
Is it possible to have a date time prompt dynamically set to UTC time zone irrespective from where users is running the report?
I have accomplished this using JavaScript in HTML Item when I am running the report when Run with full interactivity is "off".
I need this to work when we running the report with full interactivity,I try to create JavaScript to use with custom control but it's not working
define( function() {
"use strict";
function DefaultDateSelection(){
};
DefaultDateSelection.prototype.load = function( oPage )
{
var EDateTime = new Date();
EDateTime.setDate(EDateTime.getUTCDate());
var FromDate= EDateTime.getUTCDate();
var pickerControlObject = oPage.getControlByName( "PDateTime" )
pickerControlObject.setValues([{use: EDateTime.toISOString()}]);;
};
return DefaultDateSelection;
});
Any help would be greatly appreciated.
One option is to use JavaScript: https://public.dhe.ibm.com/software/data/sw-library/cognos/mobile/scriptable_reports/index.html