Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Parameter not showing in selection expert

Status
Not open for further replies.

Jonesxx

Technical User
Jul 14, 2004
71
GB
Hi,

I am using Crystal version 8.5, within the report is a date field called Createon. Createon is the only date field within the database table. I would like users to be able to select different dates from the parameter e.g createon is between 10/03/06 and 30/03/06. The problem I am having is after creating the parameter and going to the select expert to epick up the parameter, I cannot see it within the 'is between' option, however I can see the parameter within the equals to, not equal to, is greater than options. The Createon field is a DateTime field, ideally I would like users to be able to select data using the parameter for periods as well as individual days.

Please help.

Thank you v much
 
Forget about using the experts, they limit you.

Use Report->Selection Formula->Record and place:

{table.creaton} in {?startdate} to {?enddate}

Why would you think that a date range parameter couldn't perform "ideally I would like users to be able to select data using the parameter for periods as well as individual days.".

What do you see as the difference between a period and individual days?

Anyway, the above should work, if you need additional assistance I suggest using examples rather than tryting to describe requirements, it's much simpler to understand.

Also paste your database type and connectivity, when speaking of data you should explain it's source.

-k
 
Hi,

I have done what you have suggested although I am getting a message saying 'This array must be subscripted. For example Array [!].

Any ideas? Thank you
 
Ahhh, you're using a single parmeter using a range.

Try:

{table.creaton} = {?MyDateParm}

-k
 
What you need to do is create two parameters, call them Start Date and End Date. Make each of them Date parameters, not DateTime, as this can cause confusion over what records are included due to time considerations.

Once you have created the paramters go to Report->Edit Selection Formulas->Record. This will open the Record Selection Formula builder screen. At this screen put in something like this;

{Createon} in {?Start Date} to {?End Date}


You now have the date filter in your report, and each time the report is run your users will be prompted for a start and end date.

 
Having tried both suggestions I still kept on getting the array message. I found a work around though, in the Create Parameter field dialog box there is an option 'Range Values' which I ticked and it seem's to give me the outcome I was after.

Thanks
 
If you are using the range option in your parameter, then

{Createon} in minimum({?DateRange}) to maximum({?DateRange})
 
In future posts, place exactly what you used, not just the error, kind of hard to diagnose something if the poster is unwilling to share what they're doing.

-k
 
Well, actually, with a range parameter you can use:

{Createon} = {?daterange}

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top