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

Setting Dynamic Date Prompt Values (Cognos 11 R4)

Started by AlexisMolina, 29 Nov 2016 01:57:13 PM

Previous topic - Next topic

AlexisMolina

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.

AlexisMolina

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¿?