Using Crystal Reports 2008, I have a database I am trying to get info out of. I want the user to input a date range, and then in thAt date range, I want them to be able to enter search criteria from 3 different fields, but not have to enter a value in all 3. They can do 2 or just 1. But the problem is if they do not enter a value in any of the search fields, I do not want it looking for blanks in the data. I want it to just skip that search and move on to the next. I have used the following:
({RecordList.EntryDate} >= {?FromDate} and
{RecordList.EntryDate} <= {?ToDate} and
{RecordList.DocumentName} like {?SearchDocumentName}) and
({RecordList.EntryDate} >= {?FromDate} and
{RecordList.EntryDate} <= {?ToDate} and
{RecordList.RecordFiledFor} like {?SearchFiledFor}) and
({RecordList.EntryDate} >= {?FromDate} and
{RecordList.EntryDate} <= {?ToDate} and
{RecordList.Logged-in By} like {?Entered by})
And I've used this:
({RecordList.EntryDate} >= {?FromDate} and
{RecordList.EntryDate} <= {?ToDate} and
({RecordList.DocumentName} like {?SearchDocumentName} and
{RecordList.RecordFiledFor} like {?SearchFiledFor} and
{RecordList.Logged-in By} like {?Entered by})
But neither is working. What can I do to get what I am looking for?