We have this query and how can we create a report in system based on this query.
Customer can select date range and the report will be displayed.
There may be a way to do this with existing reporting tags, but I’m not the best when it comes to that so we’ll roll with SQL.
I converted your query from the old way of joining.
You’ll need to add a script:
DECLARE @StartDate DATETIME = '{Start}';
DECLARE @EndDate DATETIME = '{End}';
SELECT t.TicketNumber,
t.Date,
p.Name AS PaymentType,
p.Amount,
t.LastModifiedUserName
FROM dbo.Tickets t
LEFT JOIN dbo.Payments p
ON p.TicketId = t.Id
WHERE p.Date >= @StartDate
AND p.Date <= @EndDate
ORDER BY t.Id;
Then add a report (play around with column widths to suit your display needs):
[Ticket Report:3, 5, 3, 3, 3]
@@TicketReport
Restart SambaPOS to reload the scripts and take a look at your report.
[Payments:1,1,1,1,1]
>Ticket No|Date|Payment Type|Amount|Last Modified By
{REPORT PAYMENT DETAILS:T.TicketNumber,T.Date,P.Name,P.Amount,T.LastModifiedUserName}
I asked the helper chat bot at Knowledge base and he created that report. He can write almost any report with the right questions.
Thank you so much guys, all the above fulfill the client requirement. awesome.
How did I miss this? Has this feature been retired?



