If you are unable to create a new account, please email support@bspsoftware.com

 

News:

MetaManager - Administrative Tools for IBM Cognos
Pricing starting at $2,100
Download Now    Learn More

Main Menu

Date time prompt by default dynamically set to UTC time zone

Started by stutib, 30 Aug 2023 10:42:00 AM

Previous topic - Next topic

stutib

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.