COGNOiSe.com - The IBM Cognos Community

Legacy Business Intelligence => COGNOS ReportNet => Report Studio => Topic started by: TCM on 06 Jun 2007 01:20:08 PM

Title: Prompting
Post by: TCM on 06 Jun 2007 01:20:08 PM
I have a report that includes customers enrolled in a maintenance plan and those that are not. I would like to add a prompt so that the user can select either only maintenance plan customers (MtceCode=1), non-maintenance plan customers (MtceCode=0), or both. Creating the option to get one or the other was simple enough, but I can't get it to include them all. I used a case statement like the one below in the filter, but I can't get it to pass validation, anyone out there know what I'm doing wrong? Thank you for any help you can provide!

Case
When ?TypePrompt? in(0,1)
Then MtceCode = ?TypePrompt?
When ?TypePrompt? not in(0,1)
Then MtceCode in(0,1)
Title: Re: Prompting
Post by: wilbolite on 06 Jun 2007 01:35:08 PM
We have a similar report where in a prompt, I allow a user to select an individual person to report on, or to report on everyone.

In the filter, I have the following:

    [Employee_Number] like ?prmEmployeeNumber?

When an actual employee is selected, this works fine, returning just that employee's records.  When the user selects the "all" option, it passes a '%' value so that the filter results in returning all employees.

Perhaps this would work in your situation?
Title: Re: Prompting
Post by: TCM on 06 Jun 2007 02:07:37 PM
Thank you wilbolite, using the value prompt instead of the text prompt (which is what I was originally using) seems to have taken care of this. I appreciate the help!