COGNOiSe.com - The IBM Cognos Community

IBM Cognos 10 Platform => Cognos 10 BI => Report Studio => Topic started by: velniaszs on 18 Dec 2013 04:36:03 AM

Title: error with prompt macro prompt macro (using CognosPaul example)
Post by: velniaszs on 18 Dec 2013 04:36:03 AM
In link bellow Paul shows how he created some cool prompts.
http://cognospaul.com/2013/12/16/advanced-select-search-prompts/  (http://cognospaul.com/2013/12/16/advanced-select-search-prompts/)

What value should be used in the default value parameter (column name or table name)?
#prompt('Retailers','mun','[sales_and_marketing].[Retailers].[Retailers].[Retailers]->:[PC].[@MEMBER].[Retailers]','','[sales_and_marketing].[Retailers].[Retailers]')#

After I add this prompt data item I get the error(report source attached:

Handler trace back: [the_dispatcher] com.cognos.pogo.handlers.performance.PerformanceIndicationHandler [the_dispatcher] com.cognos.pogo.handlers.logic.ChainHandler [service_lookup] com.cognos.pogo.handlers.engine.ServiceLookupHandler [rxBalancedRequest] com.cognos.pogo.handlers.logic.ChainHandler [service_lookup] com.cognos.pogo.handlers.engine.ServiceLookupHandler [reportservicechain] com.cognos.pogo.handlers.logic.ChainHandler [warp_with_authenticate] com.cognos.pogo.handlers.logic.ChainHandler [do_warp] com.cognos.pogo.handlers.logic.ChainHandler [warpmta] com.cognos.pogo.reportservice.ReportServerHandler


Cognos 10.2
DB - Teradata 14.0
Title: Re: error with prompt macro prompt macro (using CognosPaul example)
Post by: CognosPaul on 18 Dec 2013 04:51:21 AM
Do you have the sample cubes installed? The macro is stating that if nothing is selected in the Retailers prompt, it should show the All member in the chart. Without the cubes, the example report won't work.

You don't need to use macros for this example. The easiest way to test it is to replace the source of the search prompts, and build a new list on your data source. A simple [NS].[Tbl].[Field]=?Whatever? and [NS].[Tbl].[Field2] in ?Whatever2? should be sufficient to see that it works.
Title: Re: error with prompt macro prompt macro (using CognosPaul example)
Post by: velniaszs on 18 Dec 2013 05:56:17 AM
Unfortunately I don't have sample IBM cubes.
Here is a screenshot with the cube that I created.
After I add query calculation:   #prompt('Measure','mun','[Telephony Call Monitoring Cube].[Measure].[Measure].[Measure1]->:[PC].[@MEMBER].[Measure1]')#

I get the error message:
Member reference 'Telephony Call Monitoring Cube].[Measure].[Measure].[Measure1]->:[PC].[@MEMBER].[Measure1]' does not exists
Title: Re: error with prompt macro prompt macro (using CognosPaul example)
Post by: CognosPaul on 18 Dec 2013 06:09:42 AM
The error indicates that it can't find the Measure1 member. Try  #prompt('Measure','mun','[Telephony Call Monitoring Cube].[Measure].[Measure].[Measure1]')# That will return all the members in the Measure1 level.
Title: Re: error with prompt macro prompt macro (using CognosPaul example)
Post by: velniaszs on 18 Dec 2013 09:05:18 AM
It works with your example.
I did little investigation.
1) For my prompt Measure source I have inserted [Measure] Hierarchy (All members) running query looks like :
[Measure]
-----------------------
Measure
Goodwill gesture
First Party New
...
2) For Chart Query I use:
#promptmany('Measure','mun','[Telephony Call Monitoring Cube].[Measure].[Measure].[Measure]->:[PC].[@MEMBER].[Measure]','set(','',')')#
It still comes up with error message that member reference does not exist.
Is there anything else that I am missing? (attached report xml)
Title: Re: error with prompt macro prompt macro (using CognosPaul example)
Post by: CognosPaul on 18 Dec 2013 10:05:59 AM
Without access to your data source, I cannot say why it's giving you that error. Do you still get the error if you reference that member outside a macro function?

Try using the following instead:
#promptmany('Measure','mun','[Telephony Call Monitoring Cube].[Measure].[Measure].[Measure]','set(','',')')#

That references the top level, and should work.
Title: Re: error with prompt macro prompt macro (using CognosPaul example)
Post by: velniaszs on 18 Dec 2013 10:46:26 AM
I just figure out what was wrong if i drag a measure member was using :
[Telephony Call Monitoring Cube].[Measure].[Measure].[Measure]->:[PC].[@MEMBER].[measure_id] instead of [Measure]

Thanks a lot Paul!