Cognos Analytics

 View Only

Cognos Analytics 12.0.0 - Dynamic prompt parameter values

By RACHEL SU posted Tue June 06, 2023 02:51 PM

  

Finally, the wait is over! Report authors now have even greater flexibility when it comes to define default values for all prompt types. 

A newly added ‘Parameters' view allows authors to set default values and default range values for many different types of parameters such as String, Date, Time, Date&Time and Interval.

Experience our natural language interface, advanced caching and more at the June 8 launch event!
 

When setting the default values, authors can use static text, values from a data item, or report expressions.

Row limit can be used to specify top/bottom number of values to be selected as defaults. For example, this prompt will by default always select the top 3 values returned from the datasource.

And here is an example of a date prompt always use ‘yesterday’ as the default selection.

We’ve also added dynamic defaults for first and last day in a calendar prompt. Here is an example to show date selections are limited to 3 days before and 3 days after the current date:

Finally, new ‘All parameters’ view gives user a comprehensive list of all parameters in a report.

The possibility of this feature is endless. How would you take advantage of this feature in your reports? 

7 comments
97 views

Permalink

Comments

Fri June 07, 2024 11:30 AM

@Michael Du Plessis 

The query for my prompt contains the columns:

FS Cd, FS Desc, Primary (Y/N)

There are multiple FS Cd's but only one is designated as Primary.  When Primary = Y this is what I what the default value for my prompt to be.

I've used the following report expression:

CASE ([prompt - FSCode].[Primary Financial Stmt (Y/N)])

when ('Y') then ([prompt - FSCode].[Financial Stmt Cd])

END

This is the error I get when I validate the expression:

The variable named [prompt - FSCode].[Primary Financial Stmt (Y/N)] is invalid.

Thanks for any insight!

Thu June 06, 2024 04:51 PM

@Anya Nixon is the first example showing usage of data item value not sufficient for what you are trying to do? If not, can you provide a bit more detail?

Thu June 06, 2024 03:19 PM

Exploring this functionality for the first time.  I have an income statement report and the user has various I/S formats to choose from.  They establish a default I/S format in the db.  I want to set the default value for the Cognos report parameter based on this default flag.  Example, If default I/S flag is 'Y' for a given format, then this should be the default value for my Cognos parameter.  I can't seem to make this happen.  Is this a valid use case that can be achieved with this new parameters functionality?  Any tips are appreciated.

Thu June 22, 2023 09:33 AM

Hi Marc,

The date defined in parameter default will be dynamic. If you are using current date for example, when the report runs, it will display information as the date at the time of execution.

Wed June 21, 2023 04:18 AM

Whoop! Best C12 feature so far.
Can you confirm how these defaults work for scheduled reports and reportv iews. Would the example of defaulting the date prompt to yesterday be the same for the scheduled report / report view, or would they be locked into yesterday's actual date once the have been created.

Wed June 07, 2023 12:44 PM

Been waiting for this feature for 18 years. Thanks IBM for quick response.

Wed June 07, 2023 10:38 AM

I LOVE this. I can't even count the number of times I've had to figure out crazy workarounds for defaults values.