Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: DOB prompt on main report 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: DOB prompt on main report
     Posted: 16 Apr 2010 at 7:50am

Hello,

I know this must be simple but I keep getting an error..
 
I have created a Formula field "PatDOB" formula reads : Month(db.DOB)
 
I have created a parameter field called: DOBParm and add in 01 - 12 so the user can choose which month they want to see.
 
Under my selection expert I need for them to see that DOBPar prompt, choose 1 - 12 and that looks at my PATDOB formula and only displays the prompt numbers that were selected.
 
And I can't get the above written correctly for it to work in my selection expert.
 
 
 
Help
 
Thanks
 
IP IP Logged
kevlray
Admin Group
Admin Group
Avatar

Joined: 29 Oct 2009
Online Status: Offline
Posts: 1587
Quote kevlray Replybullet Posted: 16 Apr 2010 at 9:19am
You did not state the error you were getting.  Is your prompt returning a number or a string? 
IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4374
Quote lockwelle Replybullet Posted: 17 Apr 2010 at 2:16am
just as thought, since I haven't used the selection expert, why not put the formula in the selection formulas/record section?  that is what I was taught to do to filter reports...yeah I learned a long time ago from a seagate CR tech....back in the cr7 days....it may not be the most 'efficient', but it is effective.
 
HTH
IP IP Logged
jrs1234
Newbie
Newbie


Joined: 02 Mar 2009
Location: United States
Online Status: Offline
Posts: 37
Quote jrs1234 Replybullet Posted: 19 Apr 2010 at 3:52am
sorry - I am getting "A number range is required" .. here is my formula :
 
{@PatientDOBMonth} = {?Select Month}
 
{@PatientDOBMonth} is coded as : month({Patient.DOB})
 
and {?Select Month} is coded as 01,02,03,04,05..... to 12.
 
 
Thanks
Jenn
IP IP Logged
kevlray
Admin Group
Admin Group
Avatar

Joined: 29 Oct 2009
Online Status: Offline
Posts: 1587
Quote kevlray Replybullet Posted: 19 Apr 2010 at 4:14am
Is the {?Select Month} looking for a string or a number?
IP IP Logged
jrs1234
Newbie
Newbie


Joined: 02 Mar 2009
Location: United States
Online Status: Offline
Posts: 37
Quote jrs1234 Replybullet Posted: 19 Apr 2010 at 4:23am

it is looking for a string

IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 20 Apr 2010 at 4:03am
Can you either change the election options to remove teh lead zeros or just make the param numeric? Either makes it easier.
If you drop the lead zero then try:
totext(month({table.date}))={?My Parameter}
If you make it numeric just use the selection criteria of:
month({table.date})={?My Parameter}
IP IP Logged
jrs1234
Newbie
Newbie


Joined: 02 Mar 2009
Location: United States
Online Status: Offline
Posts: 37
Quote jrs1234 Replybullet Posted: 20 Apr 2010 at 4:11am

THANKS - it worked, I used the numeric selection!!

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