Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: Age Range Parameter Post Reply Post New Topic
Author Message
moleary
Newbie
Newbie


Joined: 06 Feb 2008
Location: United States
Online Status: Offline
Posts: 28
Quote moleary Replybullet Topic: Age Range Parameter
    Posted: 15 Apr 2010 at 6:42am
I'm using 8.5. But I was wondering how to create a parameter in which users can select and age range for example the choices would be ages 366-547 or 548 and over.... how can I create this parameter to only show data in those age ranges?
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 15 Apr 2010 at 8:00am
Not sure about 8.5 but in general create a param as a string with 2 pre-defined options as  '366-574' and '548 and over' (or however you wan the
text to look)
In your select statement assuming the field is numeric try:
({param}= '366-574' and table.field in 366-574)
or
({param}= '548 and over' and table.field > 547)
IP IP Logged
moleary
Newbie
Newbie


Joined: 06 Feb 2008
Location: United States
Online Status: Offline
Posts: 28
Quote moleary Replybullet Posted: 15 Apr 2010 at 8:24am
it returns an error "A number range is required here.... my field is a number field?
IP IP Logged
moleary
Newbie
Newbie


Joined: 06 Feb 2008
Location: United States
Online Status: Offline
Posts: 28
Quote moleary Replybullet Posted: 15 Apr 2010 at 8:26am
I figured it out.... you have to use 366 to 547... ugh the little things... THANKS A BUNCH!
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 15 Apr 2010 at 8:26am
oops...
({param}= '366-574' and table.field in 366 to 574)
or
({param}= '548 and over' and table.field > 547)
 
 
EDIT:
Looks like you got it as I was answering Smile


Edited by DBlank - 15 Apr 2010 at 8:27am
IP IP Logged
moleary
Newbie
Newbie


Joined: 06 Feb 2008
Location: United States
Online Status: Offline
Posts: 28
Quote moleary Replybullet Posted: 15 Apr 2010 at 9:08am
It took me a minute then I looked agian and realized it. Thanks again. I knew it was something pretty easy but I couldn't seem to figure it out!
IP IP Logged
Post Reply Post New Topic
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



This page was generated in 0.016 seconds.