Recent Posts

Pages: [1] 2 3 ... 10
1
Reporting / Re: Cognos Analytics - JavaScript Submit Page
« Last post by dougp on Today at 07:03:55 pm »
Nice.  I don't know how I missed ControlHost.finish(). ::)
2
Report Studio / Re: Java Script for Text Box Prompt
« Last post by dougp on Today at 07:02:16 pm »
...and it uses RequireJS and AMD so it's compatible with CA 11.0.4+.  Very nice.  I'm very glad you posted this, because I can study it and add it to my tool box.

But, this is the Cognos 10 BI part of the forum.  The code may not work in 10.2.
3
Hi All,

I'm working with cognos 11.0.10 and had an issue. I was going to update file A, I checked all columns were ok and try to upload my csv file, but it appears the error Re: MSR-UPL-2106 Failed to refresh file ... Incompatible columns detected.

But when I save the same file as an excel file (.xlsx) it upload without any problem. Does anyone know why this possibly happened?


Thanks in advance
4
Report Studio / Re: Java Script for Text Box Prompt
« Last post by CognosPaul on Today at 01:17:29 pm »
The custom finish button I attached to another post does exactly this. You need to define an array of prompt names in the custom control configuration, and the minimum number of prompts that need to be selected:

"prompts":{"TextBoxPrompt1","TextBoxPrompt2"},"minSelected":1

The problem I'm running into is that I can't find good way of stacking validators onto the prompts, so rechecking each time a prompt is changed isn't working here. This checks if a prompt has a value when the finish button is clicked.
5
Report Studio / Re: Java Script for Text Box Prompt
« Last post by rajurokz on Today at 01:11:09 pm »
Thanks squish88, That was kind from your part! Will test this with my requirement and see if it works. For that matter, I'm using Cognos 10.2, but I'm hopeful that it works.

thanks,
Rajurokz
6
Report Studio / Re: Java Script for Text Box Prompt
« Last post by squish88 on Today at 12:15:29 pm »
Fair enough.  Since no one else had responded yet, I figured I'd give him at least the little bit that I had as a starting point at least.
7
Report Studio / Re: Java Script for Text Box Prompt
« Last post by dougp on Today at 12:12:30 pm »
This is the Cognos 10 forum.  formWarpRequest is a Cognos 8 thing.  It may work in Cognos 10, but I recommend you refer to the Cognos Prompt API documentation.
8
Have you tried playing around with Crosstab spaces??

http://www-01.ibm.com/support/docview.wss?uid=swg21613574

I'm not 100% it'll get you to where you want, but it might?  Worth a shot at least!!
9
Cognos Administration / Re: ESRI maps for Cognos
« Last post by dougp on Today at 12:07:00 pm »
You'll need to work with Esri support for that.  Good luck.

Something to keep in mind:  Esri decided to not play nice with others.  (I know -- What a surprise!)  Rather than contributing tools to someone else's BI stack, they decided it would be easy enough to develop a competing product.  So, a couple people worked for about a year, probably using open standards to create a new BI product -- Esri Insights.  I'm not by any means recommending the product (cost, IT complexity, no semantic layer), but it looks truly impressive as a BI dashboarding tool.  The map integration is particularly impressive.
10
Report Studio / Re: Java Script for Text Box Prompt
« Last post by squish88 on Today at 12:02:06 pm »
I haven't seen anything for this specifically, but here's a couple of older URL's I had bookmarked around using javascript in Cognos:

https://www.ibm.com/developerworks/data/library/cognos/reporting/scripting_techniques/page516.html

http://cognosandme.blogspot.com/2010_02_01_archive.html

I've also added a script that uses select prompt checks (not text box like you wanted but it might point you in the right direction) that I've cobbled together so that you can maybe get some syntax examples out of it.

Code: [Select]
<script language="javascript">

var fW = (typeof getFormWarpRequest == "function" ?getFormWarpRequest() : document.forms["formWarpRequest"]);
if ( !fW || fW == undefined) { fW = ( formWarpRequest_THIS_ ?formWarpRequest_THIS_ : formWarpRequest_NS_ );}

function validat() {

var RSched = fW._oLstChoicesDate_Range_Prompt;
var Granularity = fW._oLstChoicesHeatmap_Granularity_All;
var Sites = fW._oLstChoicesSite_Prompt_External;
var Sites_Chosen = false;
var RScheduleVal = '';
var Granval = '';

/*  Should shortcut out of the granularity check, if both Date Range and Hourly aren't chosen, 'cause there's no need to do the 3 days check  */

if ((RSched[12].selected == true) && (Granularity[1].checked == true)) {
todtval = new Date ( fW.txtDateEnd_Date_Prompt.value );
fmdtval = new Date ( fW.txtDateStart_Date_Prompt.value );
rangeDaysDiff = dateUtils.substractDate(todtval, fmdtval);

if (rangeDaysDiff > 3) {
alert('This report does not support the Hourly level granularity for a date range of greater than 3 days.  Please change either the date range chosen, or the granularity.');
}
else if (rangeDaysDiff < 0) {
alert('Please choose a Start Date that is before the End Date.');
}
else {
if (canSubmitPrompt() == false) {
alert ('Please choose a location before continuing.');
}
else {
promptButtonFinish();
}
}
}

/* should still check to make sure that the start date is before the end date */

else if ((RSched[12].selected == true) && (Granularity[1].checked == false)) {
todtval = new Date ( fW.txtDateEnd_Date_Prompt.value );
fmdtval = new Date ( fW.txtDateStart_Date_Prompt.value );
rangeDaysDiff = dateUtils.substractDate(todtval, fmdtval);
if (rangeDaysDiff < 0) {
alert('Please choose a Start Date that is before the End Date.');
}
else {
if (canSubmitPrompt() == false) {
alert ('Please choose a location before continuing.');
}
else {
promptButtonFinish();
}
}
}

/* if Date Range isn't chosen, then there's nothing to check... so just run the report */

else {
if (canSubmitPrompt() == false) {
alert ('Please choose a location before continuing.');
}
else {
promptButtonFinish();
}
}
}

// These are date utility functions
dateUtils = {
dayInMilliSeconds: 24 * 3600 * 1000,
substractDate:function(endDate, startDate)
{
var startDateObj = startDate;
var endDateObj = endDate;
var diffInMS = endDateObj.getTime() - startDateObj.getTime();
return Math.round(diffInMS != 0? diffInMS/dateUtils.dayInMilliSeconds : 0);
}
}

</script>

<input type="BUTTON" class="clsPromptButton" onClick="validat()" value="Run"/>

Hope it helps!!

P.S. - I am so NOT a javascript expert...  This script was a lot of googling and guesswork, but it worked for me, so thought I'd pass it along!!  You can never have enough syntax examples IMO!!
Pages: [1] 2 3 ... 10

       
Twittear