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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Using a formula as a parameter 1

Status
Not open for further replies.

wangui1981

IS-IT--Management
May 9, 2008
72
0
0
KE
I want to use a formula converting a number to date as a parameter.How do I do this?
I have already converted the number to date.
 
You cannot use a formula as a parameter but you can use a formula with a parameter.

What do you want the parameter to do, ask for a date range?

Software Sales, Training, Implementation and Support for Macola, eSynergy, and Crystal Reports

"What version of URGENT!!! are you using?
 
I have creted a formula changing date format from number to Date.I want to be able to select this formula 'coz when I select all I see is database fields.
 
I think you miss the point of what DGillz is getting at.

What do you want to acheive with your parameter?

Do you want the user to select a date or date range?

Do you then want to use this date to select relevant records only or to reference within the point for a paricular purpose, or both?

If (Using a very basic example on purpose) for example your formula was

//{@Numtodate}
cdate({table.datenumber})

You could then add a straight forward date range parameter allowing the user to specify their own dates (without showing database format dates) and then within the selection criteria specify as follows:

cdate({table.datenumber}) in minimum({?daterange}) to maximum({?daterange})

Or similar.

We need more information to answer your question more effectively.

Try to always include the following information in your posts:

Crystal version
Connectivity
Data source
Sample data
Desired output

'J


CR8.5 / CRXI - Discovering the impossible
 
If you have a parameter they can enter a date (or date range) in then bring up record selection formula editor and add in a line something like this:

{@myDateFormula} = {?MyDateRange}

If your formula is already converting the field to date format then this should work. Alternatively you could take the guts of the formula and use it in the selection itself:

cdate({table.datenumber}) = {?MyDateRange}
as CR85user suggested...

Scotto the Unwise
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top