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

Variable datatypes in Cognos - why only String and Boolean?

Started by psrpsrpsr, 09 Sep 2016 12:34:29 PM

Previous topic - Next topic

psrpsrpsr

Hi folks, I am new to Cognos but have experience with SAP Business Objects WebIntelligence (WebI) and some background in Java, Python, and R. So I know a bit about the principles of computing (variables, loops, etc.), but I'm not a programmer proper.

One thing that is confusing to me about Cognos is that variables are either String or Boolean datatypes. Let's say I'm creating a report that will be scheduled to run weekly. In the title of the report, I want to reference the variable of a 'Week Start' date dimension that is comprised of every date that is a Monday.

I want the report title to be: "Generic Business Report Title as of 9/5/2016". In WebIntelligence, I would simply create a variable to the effect of MAX(Week Start), and concatenate this to the report title string. In Cognos, I can't seem to do this.

Any thoughts? Is my understanding of the issue incorrect? Thanks for your input.

BigChris

In your report title you'd have a text element for "Generic Business Report Title as of " followed by a layout calculation for max([Week Start])

AnalyticsWithJay

I think you're confusing the word 'Variable'. In Cognos, variables are used for conditional formatting/rendering.

a) For example, if revenue is under 5000, change the color of the text to red.

b) Or perhaps you have a report with 4 views: Daily, Weekly, Monthly, All. If they select Daily, you only show the daily chart. If Monthly, only monthly. If 'All', you want to show all 4 lists.

For these conditions, the only types you need are Boolean or String. In 'Example A' above, the variable is Boolean because the statement is a yes or no statement -- is revenue under 5000? In Example B, you will have four possible answers. Therefore, it's a string variable.

Hope that makes sense.

For what you're looking to do, you don't need variables. You can use layout calculations.

psrpsrpsr

Thank you for your insight. I find it interesting that Cognos considers 'variables' to be mainly/only for triggering conditions in reports. I guess this is just one of the semantics and learning curves to navigate when learning a new system.