Cognos Prompt Numeric Range Validation

Cognos only supports two type of text box prompt validation; required and numbers only. In both cases Cognos evaluates the text input in real-time. If the validation fails, the prompt gets an orange dashed line underneath it and the Finish button is grayed out. The required validation fails if the prompt is empty and the… Read More »

Cognos Value Prompt Dynamic Defaults Without JavaScript

Cognos value prompt defaults can easily be set to static values. However, if you wanted to dynamically set their default values you had to employ JavaScript code on the prompt page. In fact, I have a tutorial that explains how to use JavaScript to set date prompts dynamically here. You could use a similar technique… Read More »

Captialize Cognos Text Prompt Input in Real-Time

There are times when the values in a table we need to filter on are stored as all-caps. If we supply the filter value via a Cognos prompt, we need to convert the input from the prompt to uppercase before we can make the comparison. This is usually done via the Cognos upper() function. A… Read More »

Add a jQuery UI Slider to Your Cognos Prompt Page

The prompt controls and interfaces provided in Cognos BI Report Studio are limited and a bit old-fashioned. In fact, the look and feel of these controls has not changed much in the last decade in which I’ve been working with the tool. Meanwhile, Web interface look and feel has advanced considerably. Modern users expect more… Read More »

Automated Cognos Report Performance Measurement

Performance tuning is an important part of any Cognos report development project. A report that runs fast provides better user experience and therefore produces happier customers. There are two main ways to time reports in Cognos, out of the box: Run the report and manually time with a stop watch, either physical or virtual Schedule… Read More »

Multi-prompt Validation

In Report Studio, Cognos provides two types of prompt validation: required and numbers-only. The validation options are available in the prompt property page: Required validation checks to see that the prompt in question is not empty. Numbers-only validation checks to see if the contents of the prompt contains only numbers. If either configured validation check… Read More »

Comma-Separated Multi-Value Text Prompt Input

In Cognos text prompt interfaces come in two major forms. There is the standard single-value text prompt: …and the multi-value text prompt: If you want your user to be able to enter multiple text values in a single prompt the multi-value text prompt interface is the only option available out of the box. This interface… Read More »

Setting Prompt Defaults Dynamically

For most prompt types in Cognos there is a Default property that allows for setting of static prompt defaults. This allows you to put in a specific value in advance and it works as advertised. However, there are many use cases where we want to dynamically set the default values to make the prompt interface… Read More »

JavaScript: Automatic Prompt Variable Creation

An important part of the process of working with the Cognos JavaScript API is creating variables that reference the JavaScript objects that Cognos creates to represent the prompts on the page. It’s via these variables that we manipulate the properties and call the methods on the prompt objects. This post will detail a technique to… Read More »

JavaScript: Running Code Only Once

Every time Cognos refreshes or reprompts a page any custom HTML objects and the JavaScript they contain are reevaluated and run again. There are times you may want a piece of JavaScript code in a Cognos HTML object to only execute one time. For instance, you may be setting initial default values or instantiating objects… Read More »