COGNOiSe.com - The IBM Cognos Community

IBM Cognos 8 Platform => COGNOS 8 => Report Studio => Topic started by: Sheldon on 08 Jul 2010 10:21:32 AM

Title: Explanation and Examples Of Report Studio Functions
Post by: Sheldon on 08 Jul 2010 10:21:32 AM
Is there a good source of all the Report Studio functions with
example(s) for each?  In my opinion, the
"IBM Cognos Professional Authoring User Guide" does not provide much help.  Here's an example of ParamDisplayValue" -->
***
ParamDisplayValue
Returns a string that is the parameter display value of the variable identified by "parameterName".
Syntax
ParamDisplayValue ('parameterName')
***
Examples and why I would want to use this function, what advantages it provides me, etc. are missing.  Another example - if I wanted to know the difference between char_length and length, no difference is pointed out in the online help -->
***
char_length ( string_exp )
Returns the number of characters in "string_exp".

length ( string_exp )
Returns the number of characters in "string_exp".
***
My purpose is not to bash the product's online help but to find out if there's a better source that I'm not aware of AND to hopefully see the product documentation get a new facelift.  There is a lot of function in this product that is probably underutilized because of what I've mentioned above.  I've used lots of IBM software and languages in the past such as REXX, APL, etc. and the powerful functions of these languages were fully documented.  Maybe the issue with Cognos is that it was not an IBM product until recently...

Sheldon
Title: Re: Explanation and Examples Of Report Studio Functions
Post by: rockytopmark on 08 Jul 2010 03:36:15 PM
Well Sheldon, I happen to think the guides are pretty good, so I think it is just a matter of experience that drives our differing opinion.  Anywhoo.....

ParamDisplayValue() will return the "Display" value(s) that are associated with the Use value in a parameter/prompt control.  Each Prompt control has a Display Value and a Use value.  Use value is typically a code or surrogate key...not much use to the user, but vital to the query.  What is useful to the consumer, is the textual (name or description) value, or "Display" value of the selection(s).

For example, a Value Prompt for choosing Products will have a query item representing the Product code for the Use value, and Product Description would be the Display Value.  User selects "#8 Fender Washer" but the product code 12345 is sent to the query for filtering.

What is a typical application for using this?  Pretty much any report I write has an area that displays all the filters in play for the execution.  Without paramDisplayValue() and ParamValue() there wouldn't be any way to display this, unless only inline prompts were used.

char_length() and length() are quite self explanatory... they are used to return a numeric value representing how many characters are in the value passed into the function.

Hope this helps... Mark
Title: Re: Explanation and Examples Of Report Studio Functions
Post by: Sheldon on 12 Jul 2010 12:59:15 PM
Thanks Mark - and would you consider updating the Report Studio manual :-)  Seriously, thanks for the good, detailed, explanation.

Sheldon
Title: Re: Explanation and Examples Of Report Studio Functions
Post by: Feanor on 13 Jul 2010 02:31:17 AM
Hi Sheldon,

One excellent resource of information is the "Cognos Proven Practises" section on the IBM.com website. You can find tons of information there on common subjects like modeling, reporting, etc. There are also some documents that explain the use of (specific) functions.

You can find the "Cognos Proven Practices" section here:
http://www.ibm.com/developerworks/data/library/cognos/cognosprovenpractices.html

One usefull document on dimensional functions is:
http://www.ibm.com/developerworks/data/library/cognos/page82.html

I can't seem to find a similar document on 'relational' or 'report' functions but maybe someone else can point it to us out if it exists.

I hope this information is usefull to you and others here on Cognoise.
Title: Re: Explanation and Examples Of Report Studio Functions
Post by: Sheldon on 13 Jul 2010 09:41:43 AM
Thank you very much for the pointers and links; I will be sure to check them out (working on another project right now).

Sheldon