I can’t figure out why this formula is not working and coming to the experts to see what I am missing.
dateVar EndMonth := Date(Year(DataDate),Month(DataDate),01)-1;
If {?Beg Request Date} = Date(1800,01,01) Then
Date(Year(EndMonth),Month(EndMonth),01)
else
If {?Beg Request Date} = Date(1900,01,01) Then
date(year(currentdate),month(currentdate),1)
else
if {?Beg Request Date} = Date(1850,01,01) then
Local DateVar Start := ((Minimum(LastFullWeek))+1); Local DateVar End :=
((Maximum(LastFullWeek))-6)
They each work separately in Crystal reports fine, when I comment all out and use just one at a time. When I combine the last part, it reads nothing but that last part and gives me the full week. If I use 01/01/1800 it will not give me the prev month. Help :-) TIA
|
It took a few minutes of testing, but I found a solution, but I also do not recommend declaring variables and assigning them in code. But if you enclose the last line in parenthesis, then I believe the code will work.
(Local DateVar Start := ((Minimum(LastFullWeek))+1); Local DateVar End :=
((Maximum(LastFullWeek))-6))
|