COGNOiSe.com - The IBM Cognos Community

IBM Cognos 10 Platform => Cognos 10 BI => Report Studio => Topic started by: pkrishnaq on 29 May 2013 01:38:05 PM

Title: How can I do prompts using Macros
Post by: pkrishnaq on 29 May 2013 01:38:05 PM
Hello Cognos Gurus,
I would like to know the steps involved with implementing a macro in Report Studio. The macro prompt would essentially pick a table based on the timestamp.
Say, I have 2 tables:
cc0313_abc
and
cc0413_abc

I want to use the SQL query in Report studio where I can grab either one of them at any time.

I can do this in Framework manager using

select   *
From
   cc#prompt('mmyy','token')#_abc


How do I get this in Report Studio?

Thanks in advance
Title: Re: How can I do prompts using Macros
Post by: MFGF on 30 May 2013 05:05:20 AM
Hi,

You would do it in exactly the same way.

What are you struggling with specifically?

MF.
Title: Re: How can I do prompts using Macros
Post by: pkrishnaq on 30 May 2013 08:27:27 AM
Hi MFGF,
I get an error
"The server returned an unrecognizable query framework response".
I see that the datasource has the relevant permissions.
I checked against the database and it works fine.
Thanks for replying.
Title: Re: How can I do prompts using Macros
Post by: pkrishnaq on 30 May 2013 08:41:26 AM
Ok, it works now..The macro in Report studio should be defined a little differently

We need to specify a default value say 0513


select * from cc#prompt('mmyy','token','0513')#_ita_abc


Thanks for the help
Title: Re: How can I do prompts using Macros
Post by: RKMI on 30 May 2013 01:27:43 PM
Hi,

Have you tried  to change the SQL type from native to pass-through?

Thanks,
RK
Title: Re: How can I do prompts using Macros
Post by: pkrishnaq on 31 May 2013 10:17:42 AM
No , My solution worked using native.. I tried with Pass through earlier and that failed earlier