Got it to work. Needed to add the CDATE function to the formula. It didn't give me the option to save the formula with the previous error. Here's the formula that works and the printed report works great.
if (month({AP_InvoiceRegisterWrk.InvoiceDate})<> month(cdate({@JournalPostingDate})))
or
(year({AP_InvoiceRegisterWrk.InvoiceDate})<> year(cdate({@JournalPostingDate})))
then "1" else "0"
------------------------------
Doug Higgs
Midwest Commerce Solutions, Inc
(312) 315-0960
Assistant to the Traveling Secretary
------------------------------
Original Message:
Sent: 12-14-2020 16:02
From: Therese Logeais
Subject: Crystal Report Formula Issue
Yes, but that's in Crystal. It should give you the option to save anyway if you close the formula editor down. Then save the form and try it through Sage.
------------------------------
Therese Logeais, Technology Integrators
------------------------------
Original Message:
Sent: 12-14-2020 15:55
From: Doug Higgs
Subject: Crystal Report Formula Issue
When I try to use the following formula I get "A date is required here" message on the month({@JournalPostingDate}) function.
if (month({AP_InvoiceRegisterWrk.InvoiceDate})<> month({@JournalPostingDate}))
or
(year({AP_InvoiceRegisterWrk.InvoiceDate})<> year({@JournalPostingDate}))
then "1" else "0"
------------------------------
Doug Higgs
Midwest Commerce Solutions, Inc
(312) 315-0960
Assistant to the Traveling Secretary
Original Message:
Sent: 12-14-2020 15:50
From: Therese Logeais
Subject: Crystal Report Formula Issue
Have you tested it? Do you get the error only in Crystal or does it work when you run an invoice register?
------------------------------
Therese Logeais, Technology Integrators
Original Message:
Sent: 12-14-2020 15:46
From: Doug Higgs
Subject: Crystal Report Formula Issue
No. This is not resolved. I want to compare the invoice date month and year to the Journal Posting Date. If there is a mismatch, I want to display a message warning the user not to update the AP Invoice Register.
------------------------------
Doug Higgs
Midwest Commerce Solutions, Inc
(312) 315-0960
Assistant to the Traveling Secretary
Original Message:
Sent: 12-14-2020 15:38
From: Therese Logeais
Subject: Crystal Report Formula Issue
Did that resolve it?
------------------------------
Therese Logeais, Technology Integrators
Original Message:
Sent: 12-14-2020 15:28
From: Doug Higgs
Subject: Crystal Report Formula Issue
@JournalPostingDate is a better choice than @ModuleDate.
------------------------------
Doug Higgs
Midwest Commerce Solutions, Inc
(312) 315-0960
Assistant to the Traveling Secretary