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

 

Getting a Prameter Expression showing LastCubeUpdate Date Report 10.2.1

Started by gosoccer, 09 Feb 2015 02:01:57 PM

Previous topic - Next topic

gosoccer

Friends, :) :o
I have to display in a JS Script that is used as a pop up message for the user a value that is associated to the
following Parameter Expression.

<RSClipboardFragment version="2.0"><textItem name="LastCubeUpdate"><dataSource><reportExpression>(CubeDataUpdatedOn([dsCube-xxxx].[Iss_Date]))</reportExpression></dataSource><style><CSS value="color:black;font-family:Arial;font-size:12pt;font-weight:bold"/><dataFormat><dateFormat/></dataFormat></style></textItem></RSClipboardFragment>

The report prompt screen is basically showing the Last date in which the cube was updated. It displays the information
as a part of the prompt page without any problem.

But now, I need to use this value as a variable and display it as a part of the following JS pop up message presented
to the user:

if (dataEntered > CubeLastUpdateDate) {
var msg = 'The begin date can not be past the last time we updated the data. ';
alert(msg);


I know I can get a prompt date by using the following TAG, but I'm not sure how to get a Parameter Expression from above.

If someone can help, I would greatly appreciate it.  ;D

gosoccer

Well, using the following TAG is not reading the value of the Report Expression.

function initializeDates() {
  var dateElems = document.getElementsByClassName('clsSelectDateEditBox');
  startDateElem = dateElems[0];
  endDateElem = dateElems[1];
[b] cubeLastUpdateElem=dateElems[2];[/b]
}

...
...
...
var RPDScripts ={}, oCR = cognos.Report.getReport("_THIS_");

RPDScripts.getControl = function(promptName) {
  return oCR.prompt.getControlByName(promptName);
};


alert(lastCubeUpdateVal); :( :(

gosoccer

 :(If someone could please help with this request, I would greatly appreciate it.
I have the Report Expression populated as a part of an HTML item. Now, I just need
to retrieve THIS DATE into a Java Script as a part of a Message saying you can perform
searches only prior to this date (the LastCubeUpdate).