Hi,
I am currently using Crystal v 8.5 to run a report (which somebody else wrote) which consists of various sub reports,
One of the sub reports uses the formula:
NumberVar StartMonth := if Month(CurrentDate) + 2 = 13 then 1 else Month(CurrentDate) + 2;
"Forecasts For Month " + ToText(Date(Year(CurrentDate), StartMonth, 1), "MMMM")
However the following error appears: ‘A month number must be between 1 and 12’
The other sub report uses the formula:
{Table.Field} = "A"
and
{Table.Field} } >= Date(LastYr, LastMth, 1)
and
{Table.Field} < Date(Year(PrintDate), Month(Printdate), 1)
and
{Table.Field} = {?Pm-@ActiveUser}
and
{Table.Field} = 'INM'
and
{Table.Field} <> 'CAN'
and
{Table.Field} <> 'RES'
{ContHist.RESULTCODE} <> 'RES'
However the following error appears: ‘Dates must be between year 1 and year 9999’
Any ideas as to what needs fixing regarding the formulas, thank you very much for your help.
I am currently using Crystal v 8.5 to run a report (which somebody else wrote) which consists of various sub reports,
One of the sub reports uses the formula:
NumberVar StartMonth := if Month(CurrentDate) + 2 = 13 then 1 else Month(CurrentDate) + 2;
"Forecasts For Month " + ToText(Date(Year(CurrentDate), StartMonth, 1), "MMMM")
However the following error appears: ‘A month number must be between 1 and 12’
The other sub report uses the formula:
{Table.Field} = "A"
and
{Table.Field} } >= Date(LastYr, LastMth, 1)
and
{Table.Field} < Date(Year(PrintDate), Month(Printdate), 1)
and
{Table.Field} = {?Pm-@ActiveUser}
and
{Table.Field} = 'INM'
and
{Table.Field} <> 'CAN'
and
{Table.Field} <> 'RES'
{ContHist.RESULTCODE} <> 'RES'
However the following error appears: ‘Dates must be between year 1 and year 9999’
Any ideas as to what needs fixing regarding the formulas, thank you very much for your help.