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

Record Selection Formula

Status
Not open for further replies.

BethanyDunlap

Programmer
Nov 28, 2012
6
US
Hello,

I have used a report for all of 2012 and it seemed to work correctly. Now all of a sudden, it is not. The issue is my Record Selection Formula, I believe. I created two date parameters and am comparing them to a date associated with the record. When I run it for 1/1/2013 - 1/6/2013, it grabs records from 1/1/2012 - 1/6/2012 and 1/1/2013 - 1/6/2013. As I mentioned, I used it last year and it never grabbed records from 2011. Why would it do this now? log1.date is a string in the database and my parameters are dates. Please help! Here is my record selection:

{security_log1.date} >= CStr ({?Minimum_Date}, "MM/dd/yyyy")
and
{security_log1.date} <= CStr ({?Maximum_Date}, "MM/dd/yyyy")
 
what is the format of {security_log1.date}..

paste some actual data from that field

_____________________________________
Crystal Reports 2011 and XI
Intersystems Cache 2012 ODBC connection

 
A {security_log1.date} example would be 12/03/2012. When it prints on the report, it prints exactly like this.
It is a string in the database with a length of 20.
 
date({security_log1.date}) in [{?Minimum_Date} to {?Maximum_Date}]

_____________________________________
Crystal Reports 2011 and XI
Intersystems Cache 2012 ODBC connection

 
or create only one date parameter. When creating it under options select true for allow range values and then use

date({security_log1.date}) = {?newdateparam}



_____________________________________
Crystal Reports 2011 and XI
Intersystems Cache 2012 ODBC connection

 
I ended up using your first formula and it worked perfectly! Thanks again!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top