How to shade every other Report Line?
The Crystal Report syntax for DATESERIAL:
This crystal report is entered as a formula and then used as a field in the report itself. It offers flexibility in manipulating dates for reporting purposes. Within the arena of this syntax, you can explore various inputs within the formula itself.
Taking a simple example, Crystal report designers know that there are several inherent built-in syntax / formulas that can be used on its own. Combine this built-ins with other formula can produce quite powerful effects on the output. This is when you might have to automatically force a date entry based on the date of a record etc. For example, a scenario might be that all invoices issued on any day of the month will have a due date on the last day of the following month.
Crystal Report Date Syntax
This formula returns the day of the week:
returns the value of 5 if the current date is a Thursday. It assumes Sunday is equal to 1. The first day of the week can also be defined in the formula as follows:
In the above example, the first day of the week has being defined as Monday. Therefore if the current date is Thursday, it will return a value of 4.
The following interval types can be used with date functions like DATEADD and DATEDIFF:
“m” – Month
“d” – Day (equivalent to “y”)
“y” – Day of Year (equivalent to “d”)
“w” – Weekday or Number of Weeks
“ww” – Week or Number of FirstDayOfWeeks
“q” – Quarter
“h” – Hour
“md” – Days excluding Years and Months