I'm attempting to make a report based on 2 different tables, "Alarms" and "AlarmsDetails." I tested the following code on MSSMS and it works.Copy-pasting the code into the SQL query portion of the app provides the right results. No errors are reported when building the application. Unfortunately, when trying to access the report I get the following error.
SELECT distinct
A.PermitNumberCopy,
A.AlarmInvoicepaidDateCopy,
A.AlarmInvoiceAmountCopy,
AD.[Business Name],
A.AlarmsUniqueID
FROM dbo.Alarms A, AlarmDetails AD
where A.PermitNumberCopy = AD.[Permit Number] and A.AlarmInvoicepaidDateCopy is null and year(A.AlarmDateCopy) = year(getdate())
order by AlarmsUniqueID