I am not very familiar with various date functions. It seems as though Crystal Reports only has functions which work based on the Current Date, right? Well, how do you the following?
User selects a month (any) and year (any), which is coming in via XML and they are both strings. I need to convert them to the following for record selection against a date field in the table:
- Month totals - this is a given since I would only need to to match up the month and year, right?
- Quarterly totals - this one I don't really know how to do - please advise
- YTD totals - I need some help with this also.
The year can be 2013, 2012, or whatever. How do I write the record selections for these? My first record selection is to be in the main report for YTD totals. In the following footers, i then proceed to the Monthly totals, then the Quarterly totals.
I have tried using Date({ReportParameter.Option01}) to convert as such:
DateVar DateFrom := Date({ReportParameter.Option01})
// Option01 is a string date
When I use it in the records selection, no records are pulled:
// Year To Date Selection:
{BAQReportResult.QuoteHed.EntryDate} >=
{@DateFrom}
AND
{BAQReportResult.QuoteHed.EntryDate} <=
{@DateTo}
Now, BAQReportResult.QuoteHed.EntryDate is a date field.
It has been quite awhile since I have had to use the record selection, so I may have forgotten something.