on 08-13-2015 4:17 PM
Hi Chandu,
Do you mean you need a wildcard with the value ALL in the list of values?
If the report is based off of Tables, Here's what you need to do:
1) Create a command object with this code:
Select table.field from table
UNION
Select 'ALL' from table
Make sure you DO NOT join this command to other tables.
2) Create a new dynamic prompt and under value choose the field from this command object
3) Go to the Record Selection Formula and use this code:
{?Prompt} = "ALL" or
{?Prompt} = {Database_Field}
-Abhilash
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Abilash,
Thanks
But I have a created a command object crystal report.
I have a code like this
select table1.id, table.name
From
table1
left outer join table2 on table1.col1 = table2.col1
Now I need a parameter on table1.id
when ?parameter = 1 then result should be based of all Id's
or parameter = some id given by the user of the report then result should be based of that id only.
Thanks for the help.
You'd first need to modify the existing command object:
1) Add a prompt in the command window
2) Add it to the where clause so that it looks like this:
Where
({Prompt} = 1 OR
Table1.ID = {Prompt})
3) Create a second command object based on the guidelines from my previous reply. Just replace 'ALL' with 1 as I gues you want the number 1 to be the wildcard
4) Do NOT join this command to the other command object
5) Go to the Field Explorer > Edit the prompt > Set it to Dynamic and under Values choose the field from the second command object that you create in step 3.
-Abhilash
Thanks Abhilash. It worked
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.