Custom Report Tags in detail

I have almost gotten this beat. I can format L.Hours to Number with LN.Hours how would I format a Field Calculation?

BTW @emre I had to modify yours as that was giving hours even between PunchOut and PunchIn. We would only be concerned with PunchIn to PunchOut so I modified it as follows:

[Hours Worked Report:.5,1,.3]
>Date|Employee Name|Hours
@{ENTITY STATE START DATE LIST:(ELSN=TCStatus)}
{ENTITY STATE START DATE LIST:(ELSN=TCStatus)}|Jesse|{REPORT ENTITY STATE TOTAL HOURS:(ELEN=Jesse) AND (ELSD=$1) AND (ELSS=PunchIn)}
{ENTITY STATE START DATE LIST:(ELSN=TCStatus)}|Melissa|{REPORT ENTITY STATE TOTAL HOURS:(ELEN=Melissa) AND (ELSD=$1) AND (ELSS=PunchIn)}
{ENTITY STATE START DATE LIST:(ELSN=TCStatus)}|Vanessa|{REPORT ENTITY STATE TOTAL HOURS:(ELEN=Vanessa) AND (ELSD=$1) AND (ELSS=PunchIn)}
{ENTITY STATE START DATE LIST:(ELSN=TCStatus)}|John|{REPORT ENTITY STATE TOTAL HOURS:(ELEN=John) AND (ELSD=$1) AND (ELSS=PunchIn)}
{ENTITY STATE START DATE LIST:(ELSN=TCStatus)}|Shirly|{REPORT ENTITY STATE TOTAL HOURS:(ELEN=Shirly) AND (ELSD=$1) AND (ELSS=PunchIn)}
{ENTITY STATE START DATE LIST:(ELSN=TCStatus)}|Jacob|{REPORT ENTITY STATE TOTAL HOURS:(ELEN=Jacob) AND (ELSD=$1) AND (ELSS=PunchIn)}
>Total Hours||{REPORT ENTITY STATE TOTAL HOURS:(ELSD=$1) AND (ELSS=PunchIn)}

Added a table for Wages

[Wages:1,1,1,1]
>Employee|Hours|Wage|Total Wages
{REPORT ENTITY STATE DETAILS:L.Entity.Name,L.Hours,EC.Pay Rate,=[EC.Pay Rate]*[L.Hours]:(ELSS=PunchIn) AND (ELES=PunchOut)}

Looks like this:

I dreamed about custom reports last night hahaha. This has become a real obsession with me right now.

What I have now its still evolving but I clearly got the syntax down now! Thank you @emre and everyone else not mentioned that helped me and you dont even know it :stuck_out_tongue:

1 Like

…and @Jesse this is just the tip of the iceberg :slight_smile:

1 Like

I am playing with Field Calculations right now. I would like to know any other hidden syntax for this. Is there any formatting permitted?

I’m currently working on it.

1 Like

Dear @emre

This report is giving me an error:

[Ventas (TAGS):1,2,2,2, 2, 2, 2, 3]
>Ticket|Fecha|Hora|Mesa|Neto Ticket|Taxa Serviço|Descuento|Total Ticket
{REPORT TICKET DETAILS:T.TicketNumber,T.Date,T.Time,EN.Tables Pizzaria,=100-[CA.Taxa Serviço],CA.Taxa Serviço,CA.Desconto,T.TotalAmount}

When I take the 100- out of the calculation it works…

Could you please advice?

Thanks!!!

G.

@gerlandog which version? what error? :slight_smile:

Screen:

Thanks!!!

G

Maybe its not supporting putting the calculation first… maybe its looking for a field first?

EDIT: never mind I put 100- in front of mine and it worked fine.

EDIT: you have no expression… format is {REPORT TICKET DETAILS:<fields>:<expression>}
Yours is {REPORT TICKET DETAILS:<fields>,<fields>,<fields>,<fields>,<fields>,=<field calculation>,<fields>,<fields>,<fields>} but you did not put an expression at end.

  • Not sure if that has anything to do with why its not calculating but when I used the same format and put expression at end mine calculated.

I will try with an expression, but, the problem is that I dont need one, LOL!!!

this is not working for me:

=100-[CA.Taxa Serviço]

but this is working

=[CA.Taxa Serviço]

Thanks!!!

G.

just try putting : }at end so it skips expression? note space between : and } I could be wrong just thought I would spit out an idea for ya to try.

so, in which field should I put the expression:

{REPORT TICKET DETAILS:T.TicketNumber,T.Date,T.Time,EN.Tables Pizzaria,=100-[CA.Taxa Serviço],CA.Taxa Serviço,CA.Desconto,T.TotalAmount}

?

Thanks!!!

g.

If you follow the syntax @emre provided it would be

{REPORT TICKET DETAILS:T.TicketNumber,T.Date,T.Time,EN.Tables Pizzaria,=100-[CA.Taxa Serviço],CA.Taxa Serviço,CA.Desconto,T.TotalAmount:<expression>}

So try this:

{REPORT TICKET DETAILS:T.TicketNumber,T.Date,T.Time,EN.Tables Pizzaria,=100-[CA.Taxa Serviço],CA.Taxa Serviço,CA.Desconto,T.TotalAmount: }

Did not work either…

G.

OK it seems CA.Taxa Serviço returns a result with thousand separator and it can’t evaluate it as a numeric value. Let’s see if I can solve it without the need of using TN…

BTW I’ve implemented F,C,N functions to format results as numbers. For example =C(2500*2)

1 Like

I just found a way to crash Samba in a really bad way lol.

I was testing out various things even stuff I know is wrong… so i tried

[Hours Worked Report:.5,1,.3]
>Date|Employee Name|Hours
@{REPORT ENTITY STATE DETAILS:L.Entity.Name:(ELSN=TCStatus)}
{ENTITY STATE START DATE LIST:(ELEN=$1)}|{ENTITY STATE ENTITY LIST:(ELN=$1)}|{REPORT ENTITY STATE TOTAL HOURS:(ELEN=$1) AND (ELSD=$1) AND (ELSS=PunchIn)}
>Day Total Hours||{REPORT ENTITY STATE TOTAL HOURS:(ELSD=$1) AND (ELSS=PunchIn)}

lol I will not do that again. Good thing I was using previous day work period… or it would have been an endless cycle of crashing everytime I tried to load it.

I think I have settled on a Wages view I am happy with… Now @emre just needs to release the update so I can format the Wages so its not a ridiculous number :stuck_out_tongue:

My Management Screen is coming along as well:

1 Like

I used your Template posted above @Jesse. I obviously need to figure out how to use Custom Reports, because this is what I get…

EDIT: Hmm… working fine now - not sure why, I didn’t change anything (login/logout?)

I’ve recently uploaded 4.1.66.

@Jesse your template is fine if your employees don’t clock-in clock-out multiple times in a single day.

This is my report template with new 4.1.66 features.

[Employees:1,1, 1, 1]
>Employee Name|Hours|Pay Rate|Wage
@{ENTITY STATE START DATE LIST:(ELSN=TCStatus)}
@{ENTITY STATE ENTITY LIST:(ELSN=TCStatus)}
>$1|||
$2|{REPORT ENTITY STATE TOTAL HOURS:(ELEN=$2) AND (ELSD=$1)}|{REPORT ENTITY DETAIL:EC.Pay Rate:(EN=$2)}|[=F(TN('{REPORT ENTITY STATE TOTAL HOURS:(ELEN=$2) AND (ELSD=$1)}')*{REPORT ENTITY DETAIL:EC.Pay Rate:(EN=$2)},'0.00')]
>Totals|{REPORT ENTITY STATE TOTAL HOURS:(ELSD=$1)}|| 

It uses standard printer template expressions [=x*x] to make calculations.

PS

{REPORT ENTITY DETAIL:EC.Pay Rate:(EN=Emre)}

This is a new tag that returns a single custom field value. I’ll improve current tags with that new syntax to read single values. For now the important change is I’ve renamed Ticket’s EN expressions to TEN to be able to differ it from entity expressions. I’ve updated original post with that change.

1 Like