COGNOiSe.com - The IBM Cognos Community

IBM Cognos 10 Platform => Cognos 10 BI => Report Studio => Topic started by: pkrishnaq on 01 Apr 2013 10:36:41 AM

Title: Is there a macro to devise a prompt to choose from the suffix of a table?
Post by: pkrishnaq on 01 Apr 2013 10:36:41 AM
Hi,
I am in a bit of a predicament.

I am trying to get a macro to design a prompt to pick a specific table based on the its suffix .

For e.g
if there is a table name : TableA_201304
I want the prompt to request the user to select the yyyymm..so if they enter 201304
the columns from the above table would be display
Title: Re: Is there a macro to devise a prompt to choose from the suffix of a table?
Post by: pkrishnaq on 01 Apr 2013 02:46:02 PM
Update: I could get to do this in Framework manager using
Select

   *
From
   TableA_#prompt('yyyymm','token')#

How can I do this in report studio? It returns with an error if i try the same thing.Thanks in advance
Title: Re: Is there a macro to devise a prompt to choose from the suffix of a table?
Post by: Rahul Ganguli on 02 Apr 2013 12:16:08 AM
Hi Kratos,

This should work equally well in Report Studio.
I believeyouare using SQL component in Report studio to acieve this.

Can you plese share the error you are getting.

Regards,
Rahul
Title: Re: Is there a macro to devise a prompt to choose from the suffix of a table?
Post by: pkrishnaq on 02 Apr 2013 08:42:13 AM
Hi Rahul,
I am using the SQL component of Report studio and get the following error
"The server returned an unrecognizable query framework response"
Title: Re: Is there a macro to devise a prompt to choose from the suffix of a table?
Post by: Rahul Ganguli on 03 Apr 2013 03:32:27 AM
Hi Kratos,

Are you able to run any SQL (i.e. without macros)?
It seems to be an access issue to me. If you are not able to run any SQL, please contact your administrator for access permissions.
If the simple SQL works, the we haev to check the SQL with macro and how is it different than FM. (Hope this will not be the case)

Regards,
Rahul
Title: Re: Is there a macro to devise a prompt to choose from the suffix of a table?
Post by: pkrishnaq on 03 Apr 2013 10:01:19 AM
Hi Rahul,
I am the system administrator and do have SQL access.

Unfortunately ,it seems to be a SQL issue.

I have not changed the SQL that worked good in FM.

Thanks for checking..
Title: Re: Is there a macro to devise a prompt to choose from the suffix of a table?
Post by: Lynn on 03 Apr 2013 12:25:07 PM
Take a look at the data source property associated with your SQL object in the report. You need to specify which Cognos Data source your SQL applies to.
Title: Re: Is there a macro to devise a prompt to choose from the suffix of a table?
Post by: pkrishnaq on 03 Apr 2013 01:12:40 PM
Lynn,
I have specified the correct data source.