Need Help to Custom the report

I’m trying to Custom the report like this
daily report (Include TAX, No Include Tips) And Daily TiPs report

I have separated all ticket type in Samba System 4 (Dine-In ticket, Pickup Ticket, and Deli Ticket)

Could you please help me on this to custom the report? I’m trying to read your all Tutorial and case study but still confusing please kindly help me thank you so much

A simple way would be to put something like this is each cell setting the values as needed;

{REPORT PAYMENT DETAILS:P.Amount:(T.TicketType=DiNE iN) AND (P.Type=Cash)}
{REPORT PAYMENT DETAILS:P.Amount:(T.TicketType=ToGO) AND (P.Type=Cash)}
{REPORT PAYMENT DETAILS:P.Amount:(T.TicketType=Delivery) AND (P.Type=Cash)}

But it would depend on how you are recording tips…?
Also what version are you using? if V4 I have not used custom reports in V4 and know many report tags are new to V5.

Thank you so much for prompt respond, I got the error like this.

And Detailed Report

-----------------------------
[General Info]

Application: SambaPOS
Version:     4.1.82
Region:      en
DB:          SQ
Machine:     CAPSPERS-ACER
User:        capspers
Date:        3/27/2016
Time:        5:26 PM

User Explanation:

capspers said ""
-----------------------------

[Exception Info 1]

Top-level Exception
Type:        System.Linq.Dynamic.ParseException
Message:     No property or field 'T' exists in type 'PaymentData'
Source:      Samba.Infrastructure.Data
Stack Trace: at System.Linq.Dynamic.ExpressionParser.ParseMemberAccess(Type type, Expression instance)
   at System.Linq.Dynamic.ExpressionParser.ParseIdentifier()
   at System.Linq.Dynamic.ExpressionParser.ParsePrimaryStart()
   at System.Linq.Dynamic.ExpressionParser.ParsePrimary()
   at System.Linq.Dynamic.ExpressionParser.ParseUnary()
   at System.Linq.Dynamic.ExpressionParser.ParseMultiplicative()
   at System.Linq.Dynamic.ExpressionParser.ParseAdditive()
   at System.Linq.Dynamic.ExpressionParser.ParseComparison()
   at System.Linq.Dynamic.ExpressionParser.ParseLogicalAnd()
   at System.Linq.Dynamic.ExpressionParser.ParseLogicalOr()
   at System.Linq.Dynamic.ExpressionParser.ParseExpression()
   at System.Linq.Dynamic.ExpressionParser.ParseParenExpression()
   at System.Linq.Dynamic.ExpressionParser.ParsePrimaryStart()
   at System.Linq.Dynamic.ExpressionParser.ParsePrimary()
   at System.Linq.Dynamic.ExpressionParser.ParseUnary()
   at System.Linq.Dynamic.ExpressionParser.ParseMultiplicative()
   at System.Linq.Dynamic.ExpressionParser.ParseAdditive()
   at System.Linq.Dynamic.ExpressionParser.ParseComparison()
   at System.Linq.Dynamic.ExpressionParser.ParseLogicalAnd()
   at System.Linq.Dynamic.ExpressionParser.ParseLogicalOr()
   at System.Linq.Dynamic.ExpressionParser.ParseExpression()
   at System.Linq.Dynamic.ExpressionParser.Parse(Type resultType)
   at System.Linq.Dynamic.DynamicExpression.ParseLambda(ParameterExpression[] parameters, Type resultType, String expression, Object[] values)
   at System.Linq.Dynamic.DynamicExpression.ParseLambda(Type itType, Type resultType, String expression, Object[] values)
   at System.Linq.Dynamic.DynamicQueryable.Where(IQueryable source, String predicate, Object[] values)
   at System.Linq.Dynamic.DynamicQueryable.Where[T](IQueryable`1 source, String predicate, Object[] values)
   at Samba.Addon.CustomReports.Functions.ExpressionBuilder.Filter[T](String expression, IEnumerable`1 items)
   at Samba.Addon.CustomReports.Functions.AbstractDetail`2.GetDetails(IEnumerable`1 sourceItems, String configStr)
   at Samba.Addon.CustomReports.Functions.TicketFunctions.<RegisterFunctions>b__4(Object x, String d)
   at Samba.Services.Implementations.PrinterModule.ValueChangers.FunctionData`1.<>c__DisplayClass1.<GetResult>b__0()
   at Samba.Services.Implementations.PrinterModule.ValueChangers.Helper.FormatData(String data, String tag, Func`1 valueFunc)
   at Samba.Services.Implementations.PrinterModule.ValueChangers.FunctionData`1.GetResult(T model, String currentData, PrinterTemplate template)
   at Samba.Services.Implementations.PrinterModule.ValueChangers.FunctionRegistry.<>c__DisplayClass125.<ExecuteFunctions>b__124(String current, FunctionData`1 func)
   at System.Linq.Enumerable.Aggregate[TSource,TAccumulate](IEnumerable`1 source, TAccumulate seed, Func`3 func)
   at Samba.Services.Implementations.PrinterModule.ValueChangers.FunctionRegistry.ExecuteFunctions(String content, PrinterTemplate printerTemplate)
   at Samba.Services.Implementations.PrinterModule.PrinterService.ExecuteFunctions(String printerTemplate)
   at Samba.Addon.CustomReports.CustomReportBuilder.<UpdatePrinterTags>b__2(String line)
   at System.Linq.Enumerable.WhereSelectListIterator`2.MoveNext()
   at System.Linq.Enumerable.<SelectManyIterator>d__14`2.MoveNext()
   at System.Collections.Generic.List`1..ctor(IEnumerable`1 collection)
   at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source)
   at Samba.Addon.CustomReports.CustomReportBuilder.UpdatePrinterTags(IEnumerable`1 lines)
   at Samba.Addon.CustomReports.CustomReportBuilder.AddRow(String row)
   at Samba.Addon.CustomReports.CustomReportBuilder.ProcessLine(String line)
   at Samba.Addon.CustomReports.CustomReportBuilder.Build(SimpleReport sp)
   at Samba.Addon.CustomReports.CustomReportViewerViewModel.CreateCustomReport(String reportName, SimpleReport simpleReport, Boolean addHeader)
   at Samba.Addon.CustomReports.CustomReportViewerViewModel.GetReport()
   at Samba.Presentation.Common.Reports.AbstractReport.<RefreshReport>b__2()

-----------------------------

[Assembly Info]

Samba.Services, Version=1.0.0.0
mscorlib, Version=4.0.0.0
System, Version=4.0.0.0
Microsoft.Practices.Prism, Version=4.0.0.0
WindowsBase, Version=4.0.0.0
Samba.Infrastructure, Version=1.0.0.0
Samba.Infrastructure.Data, Version=1.0.0.0
PresentationFramework, Version=4.0.0.0
System.Xaml, Version=4.0.0.0
Samba.Presentation.Services, Version=1.0.0.0
FluentValidation, Version=3.4.0.0
Samba.Domain, Version=1.0.0.0
DevExpress.Xpf.Grid.v14.1, Version=14.1.6.0
DevExpress.Xpf.Grid.v14.1.Core, Version=14.1.6.0
PresentationCore, Version=4.0.0.0
Stateless, Version=1.0.0.0
System.Core, Version=4.0.0.0
System.Drawing, Version=4.0.0.0
DevExpress.Xpf.Core.v14.1, Version=14.1.6.0
EntityFramework, Version=4.4.0.0
System.Windows.Forms, Version=4.0.0.0
System.ComponentModel.Composition, Version=4.0.0.0
Samba.Localization, Version=1.0.0.0
Microsoft.CSharp, Version=4.0.0.0
Microsoft.Practices.ServiceLocation, Version=1.0.0.0
Samba.Persistance, Version=1.0.0.0
Microsoft.Practices.Prism.MefExtensions, Version=4.0.0.0
PropertyTools, Version=2012.4.14.1

-----------------------------

[System Info]

Operating System
-Microsoft Windows 7 Home Premium
--CodeSet = 1252
--CSDVersion = Service Pack 1
--CurrentTimeZone = -300
--FreePhysicalMemory = 2374240
--OSArchitecture = 64-bit
--OSLanguage = 1033
--ServicePackMajorVersion = 1
--ServicePackMinorVersion = 0
--Version = 6.1.7601

Machine
-CAPSPERS-ACER
--Manufacturer = Acer           
--Model = Aspire 7741                    
--TotalPhysicalMemory = 8242331648
--UserName = CAPSPERS-ACER\capspers

-----------------------------

@Caps, the error you are getting is probably because the Report Tag is using parameters that are valid in V5 only, and not available in V4.

Sorry @Caps I did way I wasnt sure on if would work in V4…

Just checked and ticket type should be TY= not T.Type

1 Like

Please see this…

AND P.Type should be PT

Sorry, IO did say something like…

1 Like

So this:

Should be this:

{REPORT PAYMENT DETAILS:P.Amount:(TY=DiNE iN) AND (PT=Cash)}
{REPORT PAYMENT DETAILS:P.Amount:(TY=ToGO) AND (PT=Cash)}
{REPORT PAYMENT DETAILS:P.Amount:(TY=Delivery) AND (PT=Cash)}
1 Like

:slight_smile: i did say something like… am not on pc with samba :slight_smile:

The result is show nothing :joy:

and here is my script

and I have checked name of Ticket type

and Checked Data Existing

Please kindly help me, Thank you QMcKay @JTRTech

@Caps is you ticket name not ‘Dine-in Ticket’?
I was going by your column headers but looks like you called the ticket type Dine-in Ticket not just Dine-in

Try {REPORT PAYMENT DETAILS:P.Amount:(TY=Dine-in Ticket) AND (PT=Cash)}
{REPORT PAYMENT DETAILS:P.Amount:(TY=Delivery Ticket) AND (PT=Cash)}
{REPORT PAYMENT DETAILS:P.Amount:(TY=Pickup Ticket) AND (PT=Cash)}

1 Like

Show your Ticket Types and Payment Types.

The criteria in the Report is filtering data based on the Criteria that you give. It must match exactly the Ticket Type and Payment Type, and they are cAse-SenSiTive. This is the criteria portion:

(TY=DiNE iN) AND (PT=Cash)

So if your Ticket Type is “DiNE iN Ticket” for example, then you must use exactly that name, as such:

(TY=DiNE iN Ticket) AND (PT=Cash)

1 Like

@QMcKay, pretty sure those samples I put will work based on the screenshot of the work period report which shows ticket types and payment types as they are.
Caps, Q raises a good point though, these types of parameters need to be EXACT… :slight_smile:

@Caps not sure if I missed it but how are you recording tips? A calculation?
If so you will need to subtract these from the top table using a formula type expression as tips as calculation will be included in the payment amount (as they are the the report you have shown)
As sales and payments are not directly allocated you will need to report these with separate tags.

Thinking about tif tips are as a calculation you might really struggle to achieve the report your trying for.
You could get actual sales/non tip as a total value but given the fact payments can be split and calculations are not payment linked you are likely to need a much more complex script/sql type report to achieve your breakdown…

i have the same problem with the expense transaction report. it only gives me a opening balance and a closing balance, but doesn’t include the expense transactions for the day.

You need to write a Report specific to the data that you want to see. If you want to see Expense Transactions, then you need to design the Report to pull data for those Transactions. You have the tools you need to do this.

You can also Report on combined Payments and Expenses (or anything else really) to show what is removed or added from/to where, such as your Cash Drawer.

Custom Reports facilitates all of this, but you need to set up your Accounting properly in the first place, and then you need to specify in your Reports which Account Types or specific Accounts and/or Transaction Types you want to report on, and how.

There is no blanket solution for this, because people choose to set up their accounting in different ways, using different naming conventions, etc. Just because you might have an “Expense” Account Type and “Expense” Transaction Types does not automatically make them expenses. They are simply Accounts and Transactions to SambaPOS. You define their names and their money flow from one Account to another. Maybe you named them “Suppliers” or “Vendors” or “Importers” or “Stuff that Costs Money”. Who knows?

@JTRTech :laughing: I got the result but I still need the Total of Cash (Dinein+Pickup+Delivery) and Total of each ticket (Dinein, pickup, Deli), (Cash + Credit)

here is my script …

Please, Thank you so much. :blush:

Yes, I have separated the tip record, Could you please show me the script to report for example? Thank you so much .:blush:

Its a template not a script :stuck_out_tongue:

Anyway, not sure why its dropping to new line on each report tag.

  • FYI your not taking the tip out on those (table says exc tip)
  • Total you would just specify ticket type and leave out ticket type expression and will show all for that payment type
  • Total for ticket type would be the invers, specify table type and not payment type and would show ticket type total.

However you are still not taking in to account my previous point;

Hi @JTRTech I’m not good for programming, I trying by self but can’t figure it out :sob: but still trying implement POS to my restaurant. So everything is done but still stuck with this report :sob:
BTW, Yes CC Tip is including in Payment Type because I was read from POST and copied :smile:
Q1. I don’t know why it’s dropping down, I trying to change the format but still the same issue.
Q2. You said that “Total you would just specify ticket type and leave out ticket type expression and will show all for that payment type” and “Total for ticket type would be the invers, specify table type and not payment type and would show ticket type total.”
Could you please show me the template already tried but didn’t work may be mistaken.?


Thank you so much.

Look here and study it. This should give you everything you need to know.

https://www.sambapos.com/wiki/doku.php/custom_reporting

1 Like