GeekInterview.com
   Home |  Tech FAQ  |   Interview Questions |  Placement Papers |  Tech Articles |  Learn |  Freelance Projects |  Online Testing |  Geeks Talk |  Job Postings |  Knowledge Base | Site Search |  Add/Ask Question

  GeekInterview.com  >  Interview Questions  >  Data Warehousing  >  Cognos

 Print  |  
Question:  problem about value prompt in report studio

Answer: i have 4 countries in my database as USA, UK, INDIA, CHANA. In value prompts prompt control list, i want WESTERN_COUNTRIES, ASIAN_COUNTRIES instead of those country names. When i click on WESTERN_COUNTRIES, it should retrieve USA, UK records and when i click on ASIAN_COUNTRIES, it should retrieve INDIA, CHINA records.
How is it possible,,,pls tell me


June 06, 2008 02:41:08 #1
 Khushboo Kapadia   Member Since: June 2008    Total Comments: 2 

RE: problem about value prompt in report studio
 
From Query Explorer, open up the query for which the filters should be applied on.

2) Drag a Filter object from the Toolbox tab to the Detail Filters pane.

3) In the Expression Definition, enter the following including the #s

#prompt ('<prompt parameter>', 'token', '<default filter>')#

example: #prompt ('Countries', 'token', '[Country] IN ('INDIA','CHINA')#

4) Add a Value Prompt to the report .

5) Select the Value Prompt and in its Properties in the bottom right corner, go to the Static Choices property.

5) For each possible filter that needs to be applied, add a new Static Choice.  Make the Use the expression of the filter that you should be applied and the Display is what is shown to users in the prompt's drop down list.:

Use: <filter expression>
Display: <what is displayed to users>

Example :
Use: [Country] IN ('INDIA','CHINA')
Display: Eastern Countries

     

 

Back To Question