COGNOiSe.com - The IBM Cognos Community

IBM Cognos 8 Platform => COGNOS 8 => Report Studio => Topic started by: Tsunami on 18 Aug 2011 08:40:19 AM

Title: Prompt/parameter issue
Post by: Tsunami on 18 Aug 2011 08:40:19 AM
I have a value prompt that diplays a list of salespeople.  It uses the query subject 'Salesperson prompt' to populate the list.  That parameter is then passed to a filter for the main query subject.

For some reason, after I submit my selection, I get a system generated prompt for the same thing.  Is there something I should be looking for?  I've had this issue before but forgot the solution.
Title: Re: Prompt/parameter issue
Post by: chaithucognos007 on 18 Aug 2011 10:46:43 AM
look in the Report Main Page or Query.... whether u have 2 Filters ?
Title: Re: Prompt/parameter issue
Post by: Lynn on 18 Aug 2011 10:49:05 AM
Is the parameter name spelled slightly differently for the prompt control vs. the query filter?
Title: Re: Prompt/parameter issue
Post by: Tsunami on 18 Aug 2011 01:10:30 PM
No, they are the same.    This is a large report and I've gone everywhere it's used in a filter and set the filters as optional.  I still get a 'required' star next to the system prompt.

Title: Re: Prompt/parameter issue
Post by: Lynn on 18 Aug 2011 01:13:56 PM
Do you reference the parameter in a data item? That could cause the behavior you are describing.
Title: Re: Prompt/parameter issue
Post by: Tsunami on 18 Aug 2011 01:19:40 PM
Well, there was one but I removed it.  I thought that was my problem but I am still getting the prompt.  I searched/ran each individual query subject and I'm still coming up short.

Also, when I run my main query, it works properly and the system generated prompt for salesperson is optional.  It's when I add the prompt page that it duplicates...but I'm referencing the same parameter that already exsited in the report.
Title: Re: Prompt/parameter issue
Post by: Lynn on 18 Aug 2011 01:27:30 PM
Did you try using the search option for expression text to see if it is somewhere you missed? Could it be in conditional format or variable expressions?

You could always just copy the XML to the clipboard and do a search that way. I guess if you are getting a system generated prompt for something that you believe is optional then it has to be referenced somewhere that doesn't allow you to be optional about it.
Title: Re: Prompt/parameter issue
Post by: Tsunami on 18 Aug 2011 01:39:01 PM
Dumb question:  Where's the search function?  Never used it.

I just ran the report in XML....and didn't get the system prompt.  :o  What does that mean???  It's still showing up for HTML though.
Title: Re: Prompt/parameter issue
Post by: Lynn on 18 Aug 2011 01:42:52 PM
If you look in the edit menu you will see a "Find" option, and not a dumb question at all and I should have said Edit > Find instead of search!

In there you can select "Expression Text" and then fill in the name of your parameter to search for it.

What I meant about XML was to go to the tools menu and select "copy report to clipboard", then open notepad or something like that and paste it in there. Then do a search for your parameter to see if it helps you find some reference to it you've missed.
Title: Re: Prompt/parameter issue
Post by: Tsunami on 18 Aug 2011 02:11:40 PM
Ah, I found it!  Thx Lynn.  The Find function found one I had missed.
Title: Re: Prompt/parameter issue
Post by: chaithucognos007 on 18 Aug 2011 02:17:29 PM
Nice Solution Lynn !!! I learned something new :)