Where have I gone wrong with my custom report template?

I have created a custom report for my tills to tally up individually however I cant seem to get my head around why and how it works. So my reports arent working.

This is my report template.

  [Payments by Terminal:1, 1]
>Server|
@@PaymentsByTerminal:Server

>GreenSide|
@@PaymentsByTerminal:GreenSide

>GreenRoom|
@@PaymentsByTerminal:GreenRoom

>GreenWood|
@@PaymentsByTerminal:Greenwood

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