I'm new to crystal reports and I'm using crystal reports 2008 and Oracle 10g.
I created a group on the below formula.All the records should be displayed according to the logic in the formula.
if ((DateAdd('d',30,{table1.RECD_DATE}) < currentdate) or ({table2.DATE} < currentdate)) then "OverDue"
else if ( ( DateAdd('d',30,{table1.RECD_DATE}) > currentdate and month(cdate(DateAdd('d',30,{table1.RECD_DATE}))) = month(currentdate) )
or
( month(cdate({table2.DATE})) =month(currentdate) or month(cdate({table2.DATE})) > month(dateadd('m',1,currentdate)) )
) then "This Month"
else if ( ( DateAdd('d',30,{table1.RECD_DATE}) > currentdate and month(cdate(DateAdd('d',30,{table1.RECD_DATE}))) > month(currentdate) )
or
(month(cdate({table2.DATE})) > month(dateadd('m',2,currentdate))
) then " Next Month"
else "None"
The formula runs for only the first condition before 'OR' and rest of the records are displayed under a blank group which is because the formula failed.
I created a group on the below formula.All the records should be displayed according to the logic in the formula.
if ((DateAdd('d',30,{table1.RECD_DATE}) < currentdate) or ({table2.DATE} < currentdate)) then "OverDue"
else if ( ( DateAdd('d',30,{table1.RECD_DATE}) > currentdate and month(cdate(DateAdd('d',30,{table1.RECD_DATE}))) = month(currentdate) )
or
( month(cdate({table2.DATE})) =month(currentdate) or month(cdate({table2.DATE})) > month(dateadd('m',1,currentdate)) )
) then "This Month"
else if ( ( DateAdd('d',30,{table1.RECD_DATE}) > currentdate and month(cdate(DateAdd('d',30,{table1.RECD_DATE}))) > month(currentdate) )
or
(month(cdate({table2.DATE})) > month(dateadd('m',2,currentdate))
) then " Next Month"
else "None"
The formula runs for only the first condition before 'OR' and rest of the records are displayed under a blank group which is because the formula failed.