COGNOiSe.com - The IBM Cognos Community

Legacy Business Intelligence => COGNOS ReportNet => Topic started by: zenith on 21 Nov 2005 11:37:22 PM

Title: [Solved]Static Choice Help
Post by: zenith on 21 Nov 2005 11:37:22 PM
hi

I have a requirement as follows
I need to build a crosstab report with a single prompt on measures
eg Unit cost and Quantity from Go Sales
I need to display these in the prompt and whenever i select Quantity from the prompt it should display only the Quantity and same for Unit cost
Any Ideas

Zenith
Title: Re: Static Choice Help
Post by: Abhijit on 22 Nov 2005 03:13:03 AM
Zenith
You first take a value prompt with static choices as "Quantity" and " Unit Cost" and with a parameter say "?Choice?"
Include both the columns ( Unit Cost & Quantity ) in Tabular model.
In Defination of "Unit Cost" , write:

Ã,  If (?Choice?='Unit Cost')
Ã,  Then (<Database.Unit Cost>)Ã,  Ã,  Ã,  Ã, ----Column from Database
Ã,  Else(0)


In Defination of "Quantity" , write:

Ã,  If (?Choice?='Quantity')
Ã,  Then (<Database.Quantity>)Ã,  Ã,  Ã,  Ã, ----Column from Database
Ã,  Else(0)

Goto Report Page, & insert a calculated column (Mes Column)Ã,  as Measure in crosstab With the defination as
Mes Column= [Unit Cost]+[Quantity]Ã,  ----- Columns from Query Items

Now try the report output,
Let me know, its working or not...?

Abhijit
Title: Re: Static Choice Help
Post by: zenith on 22 Nov 2005 04:34:12 AM
Yes thanks a lot it has helped   ;D