COGNOiSe.com - The IBM Cognos Community

IBM Cognos 10 Platform => Cognos 10 BI => Report Studio => Topic started by: Mfg on 17 Mar 2016 01:32:24 AM

Title: Cognos Parameters or Prompt Macros
Post by: Mfg on 17 Mar 2016 01:32:24 AM
Hi All,

Cognos Prompt or Macro...?Which one saves time in all cases...? Clean idea of their evaluation that which one evaluates when...?

For Ex: The following data item will be used as chart series item (multiselect Measures)

Data Item (Dynamic Measure) = set(#promptmany('Measure','token')#)

Value Prompt  (Static choices):   Use Value                Display Value
                                                    [Revenue]                  Revenue
                                                    [Quantity]                  Quantity      Etc.,
                         
                               OR

Data Item (Dynamic Measure) = case when 1 in ?Measure? then ([Revenue]) when 2 in ?Measure? then ([Quantity])

Value Prompt (Static Choices):    Use Value                Display Value
                                                         1                            Revenue
                                                         2                            Quantity       Etc.,

Thanks in advance.
Title: Re: Cognos Parameters or Prompt Macros
Post by: BigChris on 17 Mar 2016 03:08:50 AM
I think you asked this one before:
http://www.cognoise.com/index.php/topic,30244.0.html (http://www.cognoise.com/index.php/topic,30244.0.html)
I'm not sure there's a clear cut answer, and certainly not "in all cases". There are plenty of posts that will educate you about the perils of using details prompts with cubes for example. I think your performance will vary on a case by case basis...if you're getting a slow response using one approach then try another.
Title: Re: Cognos Parameters or Prompt Macros
Post by: Mfg on 17 Mar 2016 05:12:56 AM
Yeah..!!

Why because i didn't get any so i tried to give example this time. Still i didn't get any idea, are they both evaluates at the same time when we try to have them as a data item in the query....?
Title: Re: Cognos Parameters or Prompt Macros
Post by: tkjenkin on 17 Mar 2016 02:40:33 PM
we are using Static Choices and that seems to give us the best performance.  But like the previous responder, it can vary.  like I said we had better success with the Static Choices
Title: Re: Cognos Parameters or Prompt Macros
Post by: the6campbells on 24 Mar 2016 06:16:56 PM
prompt macros were originally introduced to allow type-in SQL (vendor proprietary or cognos) query subjects (models or reports) to be have dynamic values. hence, at a high level it is about functionality versus a performance difference.

Title: Re: Cognos Parameters or Prompt Macros
Post by: Mfg on 25 Mar 2016 05:48:25 AM
Can you guys explain me how come prompt macros become dynamic and not report prompts.....!!

They called dynamic, just why because we can use them in pass through SQL.

Detailed Filter : [Product]=?Product?                             
                        [Product]=#prompt('Product','token')#     (why this is dynamic...?)
OR                               

Data Item:      [Product]=?Product?                             
                       [Product]=#prompt('Product','token')#      (Why this is dynamic...? )

anyhow we are passing values at prompt page..!
is there any difference in their substitutions and evaluations...??? 

Pass Through SQL: Select Product,(Quantity * Unit sales Price) as Revenue from Products where Product=#Prompt('Product','token')#  (This is dynamic which is acceptable)

Any suggestion will be appreciated.