Thanks Sergey, that is working now. One other problem is that a simple report (a few columns from a single table) works.
However, a more complex report the report doesn't show in Valentina Studio (or Xojo) and in Studio from the same data when I set the data source to MS SQL Server (even though they show on the "Test" tab of the query editor in Valentina Studio.
Exactly the same data appear with no problem in Postgres! The report has a grouping by wteId and sorting by wteSurname, wteName and wtdDate
Any ideas why this happens?
The query is:
SELECT wtEmployee.wteId, wteDepartment, wteClockCard, wtdDate, wtdTimeFrom, wtdTimeTo, wtdTime2From, wtdTime2To, wtdTime3From, wtdTime3To, wtdTotalHours, wteSurname, wteName
FROM wtDailyWork, wtEmployee
WHERE wtdDate BETWEEN '2016-4-1' AND '2016-4-15'
AND wtEmployee.wteId = wtDailyWork.wteId
ORDER BY wteSurname, wteName, wtEmployee.wteId, wtdDate