Hello People, I have a Problem :'(
In the previous version I used this code to get a date or whatever is by default:
var oCR = cognos.Report.getReport("_THIS_");
var oP = oCR.prompt.getControlByName("date");
var allValues = oP.getValues(true);
var firstValue = allValues[2];
oValues = [firstValue];
oP.setValues(oValues);
setTimeout("promptButtonFinish();",1000);
but in Cognos 11 R4 this not work (I need to use "interactivity mode"),
How can I use this in a custom control?. Some clue? I would appreciate it very much if you help me.
define( function() {
function PageModule()
{};
PageModule.prototype.load = function( oPage )
{
console.log( "PageModule.load" );
};
PageModule.prototype.show = function( oPage )
{
console.log( "PageModule.show" );
var oControl = oPage.getControlByName("fechaHasta");
console.log( oControl ? "found control" : "control not found" );
oControl.addValues( [oControl.getValues( true )[2]] );
//oControl.addValues ( [JSON.parse('{"use":""}')] );
};
return PageModule;
});
I use this but it does not work... help¿?