Custom Report Tags in detail


Did you tried O.Total?



that worked great!!!

could you help me out with the client problem?

Thanks one more time!!!



@kendash couldn’t found original post but for 4.1.70 Money function =M([<field>]) will format value as windows regional currency format.


@gerlandog you can use Ticket.TicketEntities.Any(EntityTypeId==1) for now. I’ll try to implement a short expression for that.


On 4.1.70 (TCET=Customers) will work.



many many THANKS!!!



Now all you did with this is make me want to find out any other syntax like that hahahaaha.


Dear @emre, once you have a design made in a custom report, adding or deleting fields is very difficult or at least I could not accomplish that…

could you check it please?




Dear @Emre, this is not working

[Tickets por Cliente:2,2,2,2,2,3, 2]
{REPORT TICKET DETAILS:T.TicketNumber,T.Date,T.Time,EN.Customer,EC.Customer.Phone,EC.Customer.Points,T.TotalAmount:(TCET=Customers)}
>Total Ventas||||||${REPORT TICKET TOTAL:(TCET=Customers)}

[Exception Info 1]

Top-level Exception
Type:        System.FormatException
Message:     Input string was not in a correct format.
Source:      mscorlib
Stack Trace: at System.Number.StringToNumber(String str, NumberStyles options, NumberBuffer& number, NumberFormatInfo info, Boolean parseDecimal)
   at System.Number.ParseInt32(String s, NumberStyles style, NumberFormatInfo info)
   at System.Convert.ToInt32(String value)
   at Samba.Domain.Models.Tickets.Ticket.<>c__DisplayClassf1.<ContainsEntityType>b__f0(TicketEntity x)
   at System.Linq.Enumerable.Any[TSource](IEnumerable`1 source, Func`2 predicate)
   at Samba.Domain.Models.Tickets.Ticket.ContainsEntityType(String entityTypeId)
   at lambda_method(Closure , TicketData )
   at System.Linq.Enumerable.WhereEnumerableIterator`1.MoveNext()
   at System.Linq.Enumerable.WhereSelectEnumerableIterator`2.MoveNext()
   at System.Linq.Enumerable.Aggregate[TSource,TAccumulate](IEnumerable`1 source, TAccumulate seed, Func`3 func)
   at Samba.Addon.CustomReports.Functions.AbstractDetail`2.GetDetails(IEnumerable`1 sourceItems, String configStr)
   at Samba.Addon.CustomReports.Functions.TicketFunctions.<RegisterFunctions>b__a(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__DisplayClass11e.<ExecuteFunctions>b__11d(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()




Hmm… For a quick workaround use Id for EntityType instead of Entity Type Name. It will work fine with Entity Type Names on next update.


sorry, did not understant you!!



Use id instead of name. For example (TCET = 1)


@Emre, what would be the correct syntax to retrieve the Payment Type in the ticket details?
I tried PA.Name, PA, PA.Type and could not make them work…

What happens when a ticket has more than one Payment type?




These are supported ticket details fields.

  EN.<entity type>                    Entity Name
  EC.<entity type>.<field name>       Entity Custom Field Value
  TS.<state name>                     Ticket State
  TT.<tag group name>                 Ticket Tag Value
  CA.<calculation type name>          Calculation Amount
  PA.<payment type name>              Payment Amount 
  T.Department                        Department Name
  T.TicketType                        Ticket Type Name
  T.User                              User Name
  T.Date                              Ticket Date  
  T.Time                              Ticket Time
  T.Terminal                          Terminal Name
  T.Tax                               Total Tax Amount
  T.TotalAmount                       Total Amount
  T.RemainingAmount                   Remaining Amount

More Info…

As shown on the list we support PA.<payment type name> field. (eg PA.Cash, PA.Credit Card).

So you can either create a separate column for each payment type to display payment amount in related payment type or group tickets by payment type.


I must be doing something wrong…

[#Ventas:1,2,2,2, 2, 2, 2, 2, 2, 3]
>Ticket|Fecha|Hora|Mesa|Dinero|Tarjeta|[C]Neto Ticket|[C]Taxa Serviço|[C]Descuento|[C]Total Ticket
{REPORT TICKET DETAILS:T.TicketNumber,T.Date,T.Time,EN.Tables Pizzaria,PA.Dinero,Pa.Tarjeta,=[T.TotalAmount]-[CA.Taxa Serviço]-[CA.Desconto],CA.Taxa Serviço,CA.Desconto,T.TotalAmount}

Sorry, and Thanks!!!



What is wrong with that report?

PS: Pa.Tarjeta should be typed as PA.Tarjeta


PA.Dinero is always a -
and now that I corrected Pa.Tarjeta to PA.Tarjeta:


Did these tickets paid with Dinero? What is dinero? cash?

Can you also include PA. field (without payment type name) to display total payment amount and add a screen shot for it?


yes, Dinero is Cash. Yes, two tickets were payed with Tarjeta (cc) and the rest with Dinero (cash).

I changed the PA.Tarjeta to just PA


@gerlandog not PA. It should be PA.