Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: Create an "All" option in a report prompt Post Reply Post New Topic
Author Message
jrs1234
Newbie
Newbie


Joined: 02 Mar 2009
Location: United States
Online Status: Offline
Posts: 37
Quote jrs1234 Replybullet Topic: Create an "All" option in a report prompt
     Posted: 02 Mar 2009 at 10:52am
Hello,
 
I know this can be done but I can't rememeber how!
 
I have built a prompt for Insurance Company from the table element Pat.InsuranceName.
 
So I built my prompt called 'Insurance Name'
and list looks like this:
Insurnace 1
Insurnace 2
Insurnace 3
 
 
What I want is to have the prompt list look like:
 
All
Insurnace 1
Insurnace 2
Insurance 3
 
So the All prompts pick all insurance types that are listed in the prompt field.
 
Hope this makes sense!
Jen
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 02 Mar 2009 at 11:25am
Us a command to add add an "All" record joining to the insurance table.
In your select statement use an if statement to handel it so if they select "All" then it will not filter on the insurance else =selected insurance
IP IP Logged
jrs1234
Newbie
Newbie


Joined: 02 Mar 2009
Location: United States
Online Status: Offline
Posts: 37
Quote jrs1234 Replybullet Posted: 02 Mar 2009 at 11:32am
can you help me with the select statement...
 
thanks
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 02 Mar 2009 at 11:36am

Sorry, forgot you also need a parameter field to point to that same db field you added the "All" to. For the below select statement we will call the parameter "Choose Insurance".

if {?Choose Insurance}<>"All" then {?choose Insurance}={table.insurancefield}
IP IP Logged
jrs1234
Newbie
Newbie


Joined: 02 Mar 2009
Location: United States
Online Status: Offline
Posts: 37
Quote jrs1234 Replybullet Posted: 02 Mar 2009 at 11:53am
got it thanks !!!!!!!!Thumbs%20Up
IP IP Logged
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum