How to make a template for each till to have a separate report?

Well I was using this tutorial for the SQL stuff, www.sambapos.com/wiki/doku.php?id=creating_custom_reports_with_sql
So I don’t Think I have a SQL script.

Also I have removed that symbol but it is still coming up with the Bad Syntax

thanks

Those are calling a SQL script so if you have no script it will do nothing. Did you read the report syntax page I linked you? It explains report tags which is much simpler than using SQL.

Wait, the script is found here correct? : Management > Automation > Scripts

If so that is what I showed you earlier

You have not shown any SQL scripts.

That is where I have gone wrong. If that is not a script then I dont even know where to start on a SQL script, I followed that tutorial and it hasn’t made sense from the start. I know SQL is very hard to understand you you guys make it seem a lot easier than it actually is. which I appreciate so much.

The link I gave you earlier shows how to use report tags which are much simpler than SQL you should look at it.

The tutorial you linked is well written and very explanatory. However for someone new I recommend using report tags and not SQL

I will have another look at it @Jesse, however I am not making promises that I wont be back tomorrow asking more questions about something like this.

Questions are good this is how we learn.

2 Likes

Hello. First of all it is very important to properly format your templates while posting forum. After pasting template select it and click </> button located on the editor toolbar. I’ve corrected your template so…

[Tickets:1,2,2,2,2, 2]
>Ticket No|Date|Time|Customer|Table|Amount
>CarreraUK's Tickets
@@TicketList:CarreraUK
>Administrator's Tickets
@@TicketList:Administrator
>Demo User's Tickets
@@TicketList:Demo User

For this template error message complaints about 's prefixes. Remove quotation marks from user names and try again.

Guys I am still struggling with this custom reports. I cant even make myself understand the simplest of things like custom report tags. I dont have a template because it has being genuine trial and error and now I am pushed on time, any help?

Much appreciated.

The link I provided is highly detailed. We can’t help you if you don’t show us what you have tried. Your wanting someone to just do it for you.

@Jesse well this is a script which I am using right now. However this is not fully what I want but at least it is a start.

`@@DaySales:
SELECT 
  convert(nvarchar,T.Date,103) as date,  
  min(datename(dw,Date)) as morning,
  FORMAT(ISNULL(SUM(T.TotalAmount)-SUM(Cal.CalculationAmount),0),'C') as NetTicket,
  FORMAT(SUM(case 
      when Cal.CalculationTypeId = 4 then Cal.CalculationAmount
	  else 0 end),'C') as Taxa,
  FORMAT(SUM(case 
      when Cal.CalculationTypeId = 1 then Cal.CalculationAmount 
	  else 0 end),'C') as Desconto,
  FORMAT(SUM(T.TotalAmount),'C') as TotalTicket

FROM Tickets AS T

LEFT OUTER JOIN Calculations as Cal on Cal.TicketId = T.Id

WHERE Date > '{Start}' AND Date < '{End}'

GROUP BY convert(nvarchar,T.Date,103)

ORDER BY min(T.Date)`

but I also keep getting an error.

This is my Report

Is this any good or not?

So you don’t want to try report tags? Btw the @@ at top of script is not needed.

In this case would it not be easier to make separate tills.

Error message says @@DaySales is not a valid Page Size. Please use a correct page size.

1 Like

Hi guys, I have successfully started the report however I am wondering how to make the report split so one side is telling us what it is showing and one side the total. For example

I need that Cash total split from the money.

This is my tag template:

  [Gardenroom 1:1,1]
{REPORT PAYMENT TOTAL:(PT=Cash 1)}
{TICKET TAG LIST:(O.ItemGroup:Beverages)}
[GreenSide 1:1]
Cash Total: {REPORT PAYMENT TOTAL:(PT=Cash 2)}
[Greenwood 1:1]
{REPORT PAYMENT TOTAL:(PT=Cash 3)}

You can define columns by using pipe (|) char. You can find more info about basic syntax here.

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

Hi @emre I am just wondering which report tag would be best for working out the total the menu categories earn.

Sorry that may have multiple meanings. Can you explain your exact need?

Sorry @emre for the late response. I am wondering what custom tags I would have to put in to get something like this. but instead of it being item grouped I want it by tills.

thank you