Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how to display reports based on user prompt

Status
Not open for further replies.

asini

Technical User
Nov 13, 2008
22
US
Hello Greetings To All,

actually we have 3 same reports(except date condition is different)

1) is short term liquidity (has account no, name, amount) Condition--> Payment Date between today & nextyear same day
2) is long term liquidity(has account no, name, amount) Condition--> Payment Date greater than nextyear same day
3) is all liquidity(has account no, name, amount) Condition--> Payment Date greater than Today

these three reports working fine

but as per authorities they requested us to create only one report with prompt shows options as "Short Term" , "Long Term", "Both"
when the user selects option the report has to work

once again remind you, in all three reports all columns were same just the date column condition is different

Please Help Me

Really appreciate it, Thanks in advance

asini
 
Try the following option:

1. First create the following query item (say Filter1):

CASE
WHEN (?Option? = 'Short Term' AND Payment Date between today & nextyear same day) THEN (1)
WHEN (?Option? = 'Long Term' AND Payment Date greater than nextyear same day) THEN (1)
WHEN (?Option? = 'Both' AND Payment Date greater than Today) THEN (1)
ELSE (0)
END

2. Then drag the above item to filters and set it to equal to 1 : [Filter1] = 1

Make sure you remove the old filter.
 
Hello ICT,

First of all thank you veru much for your reply,

in step 1 you asked me to create a query item that is in Report itself right?

and also in step 1 you are using ?Option? where do i need to declare this ?option?

please give me your valuable sugestion.

could you please explain the procedure

Best Regards
asini
 
Assume you are using Cognos 8. To reference a prompt, you need to put ? before and after the prompt name. So if your prompt is called for example param_option, then it will look like this: ?param_option?.
 
A prompt is associated with a parameter and promptname is not relevant in this respect. The parameter name associated with the prompt can have any name , but it is the parameter that is used with leading and trailing '?', like:

?some_parameter?

Ties Blom

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top