Where have I gone wrong with my custom report template?

Did you created SQL Script?

###@@PaymentsByTerminal

select PT.Name,
    SUM(Amount) as Amount
  from Payments
  inner join PaymentTypes as PT on PT.Id = PaymentTypeId
  where TerminalId in (select Id from Terminals where Name = '@1') 
     and Date > '{Start}' and Date < '{End}'
group by PT.Name

If you don’t know how to add SQL Scripts check this tutorial.

I’ll strongly suggest to review these custom reports tutorials.

http://www.sambapos.com/wiki/doku.php?id=custom_reporting

1 Like