COGNOiSe.com - The IBM Cognos Community

Legacy Business Intelligence => COGNOS ReportNet => Report Studio => Topic started by: morphy on 12 Nov 2008 04:28:30 AM

Title: Help in creating prompts with a GROUP BY clause
Post by: morphy on 12 Nov 2008 04:28:30 AM
Hi all,

Please someone kindly explains me how to create a prompt on the following
SELECT (with a GROUP BY clause):

SELECT SUM(HOURS) AS sum, TRADE AS Trade                     
FROM BOOKEDHOURS
GROUP BY TRADE

Now I would like to create a prompt based on the date (DATE is a field
of the BOOKEDHOURS table).

I think I am having problem because i dont find the DATE field within
the available components (because DATE is not selected in the SELECT).

How can I solve this problem?

Thanks in advance.

PS:
I need to learn better how to create prompts. CASCADING PROMPTS TOO!!!
Do u have any book or some information?
I could pay for them too!

Matt
Title: Re: Help in creating prompts with a GROUP BY clause
Post by: imts on 14 Nov 2008 12:44:28 AM
Hi Matt,

Seems like u already answered ur own query. U need to have DATE in the SELECT clause . Then u need to include it in the GROUP BY clause as well.

U can use that in ur prompt then. ( Else u can have simple SELECT of all the columns and then GROUP BY in the report studio.)

Regards,
Tarun
Title: Re: Help in creating prompts with a GROUP BY clause
Post by: morphy on 14 Nov 2008 12:50:53 AM
Hi Tarun,

Many thanks!

U confirmed my doubts.

Now I got it.

Have a great day.

Ciao
Matt