If you are unable to create a new account, please email support@bspsoftware.com

 

News:

MetaManager - Administrative Tools for IBM Cognos
Pricing starting at $2,100
Download Now    Learn More

Main Menu

use value prompt in report page ,instead of a prompt page ,pls help!

Started by ycbao, 05 May 2009 09:54:44 AM

Previous topic - Next topic

ycbao

hello,all
I want to use prompt control and list on a report page ,not to use a prompt page,then when running the report,the query in the list executed first,instead of show me a value select (or input) prompt ,how to do in order to first ,show me a value prompt to select or input ,then auto running the query in the list using the parameteres that first select.
Can anyone help me ?
Thanks!

Gopinath


ycbao

but if set the filter optional, when report running ,list also displayed with query result,I want to first display the promt to be select ,then the query run ,and display the result .
how I can do ? first ,display prompt to select ,then the query execute ,and at last,display result.
anyone help me,thanks!

Gopinath

Just leave the filter as Required. It will then prompt you to select a value when running the report.

ycbao

hi, my friend
but i want to be display with the value prompts control that i've customized , how to control the main query not execute at first running the report.

CognosPaul

If I understand correctly, you want to have the report show a value prompt, followed by an empty list. The list should only be generated after the user selects a value from the prompt?

Try this, replace the ?Parameter? in the query with: #prompt('Parameter','datatype','baddefaultvalue')#

This will allow the report to generate without prompting the user, but try to filter on a non-existing value, nulling the list. Once the user selects a value from the prompt, the list will then filter on a good value.

ycbao

thanks, PaulM
it does work , but how to let the query not run first? and how to control to execute the query after manually select or input the prompt , your method still display the main query result . It does not what i want .
thanks!

Gopinath

It won't display the prompts control that you have customized. Try having a prompt page and copy/paste the same prompt from report page. So that it will prompt(Customized) you while running the report and runs the list query based on the prompt value. Again you can use the prompt in your report page to filter you query further.

CognosPaul

Generally it's better practice to do as Gopinath suggested; put the prompt in a prompt page, then have another prompt in the report itself. There are significant advantages to prompting the user for prompts before the report is run.

Just thought of another way; Create a Boolean variable: ParamDisplayValue('Parameter') is not null
then set the render variable on the list to that variable. The downside of this is the entire list won't be rendered, list title included. The positive side is since Cognos only runs queries against rendered objects, it won't try to run the query against the non-rendered list.

ycbao

thanks to Gopinath and PaulM !
    i add a prompt page ,copy prompt from report page to prompt page ,and is work well,
thanks very much!  Gopinath and PaulM!