on 05-30-2008 3:50 PM
Post Author: pvds
CA Forum: Data Connectivity and SQL
Hi everyone,
I have a report which has 2 parameters. According to the requirement if the user enters only one parameter and leave the other parameter blank(if he doesnu2019t wanted to enter or if he doesnu2019t know the value to enter) it should take only one parameter and filters the data according to that parameter only. The problem is that crystal is not letting me view the data unless I enter two parameters. Is there any other way to make the second parameter optional?
If u dint get my point I have an example
E.g.: I have two parameters called country and region. First parameter is country and second is region parameter. By this user can view the data filtered by country and specified region.
What if any other user wanted to view the whole country data with out specifying the region?
Can we make the region parameter optional? Is there any formula for that?
or
Is there any way to dynamically pass parameter to sql query?
Thanks in advance.
Post Author: pvds
CA Forum: Data Connectivity and SQL
wow it worked. but one of my report has date parameter and i tried the same if then statement but it is giving an error as string is required.
what i did is if {?Suspended Date} ="" then {Command.SUSPENDED_DATE} >" "else {Command.SUSPENDED_DATE} = {?Suspended date}
Thanks for the reply
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Post Author: RyanWamsat
CA Forum: Data Connectivity and SQL
You can write an if then statement in your selection options.if <parameter> = "" then {field.whatever} >= " " <--- There's a space there.This should return everything in that field.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.