Incorrect syntax near the keyword 'WHERE' - JetReports and Business Central 2022

101 views Asked by At

We are using Business Central 2022 and JetReports together. Just recently migrated from NAV09 and updated all our reports. Our BC22 has alot of modifications in form of extensions. Lately we have started getting some errors that we have never seen in JetReports before. We get the error message "Incorrect syntax near the keyword 'WHERE'" for alot of NL("Rows") functions.

If I check the SQL query, I see something similar to:

select * 
  from customers as cust
 inner join customers$extension as ext on  where ...

It is obvious that JetReports fails to build the join between my base table and the extension, however it is unclear for me why this happens. Everything else in the query is correct - If I manually add the join to the query it runs successfully against the database, if I try that.

-- Manually corrected query
select * 
  from customers as cust
 inner join customers$extension as ext on cust.[No_] = ext.[No_] where ...

We are running on BC 22 v.22.1.55890.56216 and my JetReports version in Excel is 23.4.0.3181

I expect JetReports to be able to produce a functional SQL query, with a join between the base entities and the extension objects that we have installed.

The dataprovider is set up to connect directly to the database.

0

There are 0 answers