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!

Parameter/Formula Question

Status
Not open for further replies.

jayster7

IS-IT--Management
Feb 7, 2001
24
0
0
US
I have a report reading a table containing a credential date field {table.credate}. I want to allow the user to enter a date range as a parameter and then have the report caluclate the date range minus 2 years, ({table.credate}-730) right(?) and give that output. I'm getting a little stuck though in getting output. Any help is appreciated. Thanks! :)
 
{table.date}-730 is not right, it wouldn't allow for leap years.

Try:

{table.date} > dateadd("y",-2,{?MyParm})

Are you stating that you ONLY want data from the previous 2 years?

If it's a date range, use something like:

Report->Edit Seelction Formula->Record:

{table.date} >= dateadd("y",-2,minimum({?DateParm}))
and
{table.date} <= dateadd("y",-2,maximum({?DateParm}))

If this doen't help, please post meaningful technical information (and on all future posts, you make people guess with little blurbs about requirements like this):

Crystal version
Database/connectivity used
Example data
Expected output

-k
 
Synapse, apologies for not giving the tech specs. I used the range values that you specifed and it worked like a charm using "yyyy"! Using CR10 accessing .dbf tables from a medical provider database, but it gave exactly what I was looking for, provider records, where their credentialing was 2 years ago from the month the user specified in the parameter. THANK YOU so much!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top