Custom Report Tags in detail

I think we need to store pay rate as a custom data so past reports won’t change when we adjust pay rates.

Custom Data format is

<field1>=<value1>;<field2>=<value2>

So while creating the log we can setup custom data as

Pay Rate={ENTITY DATA:Pay Rate}

We can read log pay rate with CD.Pay Rate

1 Like

I am learning: Managed to play with colors a little.

Hmm for some reason it will not save Brush changes. I made sure I right clicked and chose Save.
Is it supposed to do that? I was really hoping to change these values.

1 Like

Good Morning @emre, the new version corrected the error!!! Thanks!!!

but I still cannot manage to do calculations…

in this report:

[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,=[T.TotalAmount]-[CA.Taxa Serviço]-[CA.Desconto],CA.Taxa Serviço,CA.Desconto,T.TotalAmount}
>Tickets: {REPORT TICKET COUNT}||||=[T.TotalAmount]-{REPORT CALCULATION TOTAL:(CT=Taxa Serviço)}-{REPORT CALCULATION TOTAL:(CT=Desconto)}|{REPORT CALCULATION TOTAL:(CT=Taxa Serviço)}|{REPORT CALCULATION TOTAL:(CT=Desconto)}|{REPORT TICKET TOTAL}

I get:

Thanks!!!

G.

You have [T.TotalAmount] but where is rest of syntax for tag?

Should be something like

[=TN('{REPORT TICKET TOTAL}')-TN('{REPORT CALCULATION TOTAL:(CT=Taxa Serviço)}')-TN('{REPORT CALCULATION TOTAL:(CT=Desconto)}')]

instead of

=[T.TotalAmount]-{REPORT CALCULATION TOTAL:(CT=Taxa Serviço)}-{REPORT CALCULATION TOTAL:(CT=Desconto)}

Try this one @gerlandog

[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,=[T.TotalAmount]-[CA.Taxa Serviço]-[CA.Desconto],CA.Taxa Serviço,CA.Desconto,T.TotalAmount}
>Tickets: {REPORT TICKET COUNT}||||[=TN('{REPORT TICKET TOTAL}')-TN('{REPORT CALCULATION TOTAL:(CT=Taxa Serviço)}')-TN('{REPORT CALCULATION TOTAL:(CT=Desconto)}')]|{REPORT CALCULATION TOTAL:(CT=Taxa Serviço)}|{REPORT CALCULATION TOTAL:(CT=Desconto)}|{REPORT TICKET TOTAL}

EDIT: Woops had a typo try it now.

@gerlandog new expression feature ,=fx(x) does only works for DETAILS tags. It allows us to make calculations while choosing fields for table reporting. For calculations outside DETAILS tag you’ll use printer template expressions [=f(x)]

@gerlandog Here is part of that table in a Pivot Table format. Thought you might like to see it this way. I did not include the Calculations because it would have to be built differently for those… Anyway just showing you this so you can see different options.

Any idea @emre? I know you do not mean for us to access this but I thought it should save the Brushes.

Lol @Jesse you’re in trouble with colors :slight_smile: It seems it only stores layout related changes. I’ll note that and check it while improving pivot features. As it is not programmed by me I have little control on how it behaves.

1 Like

I was afraid of the answer. You affirmed my assumptions I figured it was something else. Thank you for looking into it.

Dear @emre, sorry to bother you so much… but I cannot figure this out…

this report:

[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,=[T.TotalAmount]-[CA.Taxa Serviço]-[CA.Desconto],CA.Taxa Serviço,CA.Desconto,T.TotalAmount}
>Tickets: {REPORT TICKET COUNT}||||[={REPORT TICKET TOTAL}-{REPORT CALCULATION TOTAL:(CT=Taxa Serviço)}-{REPORT CALCULATION TOTAL:(CT=Desconto)}]|{REPORT CALCULATION TOTAL:(CT=Taxa Serviço)}|{REPORT CALCULATION TOTAL:(CT=Desconto)}|{REPORT TICKET TOTAL}

throws this: (Note the totals column in the second report should be $235.50)

if I take out the -{REPORT CALCULATION TOTAL:(CT=Desconto)} part fronm the calculation… it works, but its not correct (the value)…

could you please help me out?

Thanks!!!

G.

@gerlandog it is same with printer templates. You should use TN function to convert tag results to number.

1 Like

Here is a SQL script with INSERTs into [EntityStateLogs] for 4 Employees for 2014 for Jan thru Sep you can use to test.

EntityStateLogs_4 Employees_201401-201409sql.zip (8.2 KB)

Dear @Emre… I have been playing with th TN function… and this are the results: (the second part of the screen hold the report with tags, and the first part the report with SQL)

[=TN({REPORT TICKET TOTAL})-TN({REPORT CALCULATION TOTAL:(CT=Taxa Serviço)})]
  1. I asume that a column that has no values is NULL, so this nulifies all the ecuation
  2. it appear that is rounding the number?
  3. when you have a null column, all the forumla becomes null

If I add the NULL part of the forumla, the DISCOUNT column, all becomes null:

[=TN({REPORT TICKET TOTAL})-TN({REPORT CALCULATION TOTAL:(CT=Taxa Serviço)})-TN({REPORT CALCULATION TOTAL:(CT=Desconto)})]

THANKS!!!

G.

YOu still have it wrong. you forgot the ' it should be

[=TN('{REPORT TICKET TOTAL}')-TN('{REPORT CALCULATION TOTAL:(CT=Taxa Serviço)}')] 

[=TN('{REPORT TICKET TOTAL}')-TN('{REPORT CALCULATION TOTAL:(CT=Taxa Serviço)}')-TN('{REPORT CALCULATION TOTAL:(CT=Desconto)}')]

Not sure that will make a difference but worth a try.

The rounding you can format with =F. try

$[=F(TN('{REPORT TICKET TOTAL}')-TN('{REPORT CALCULATION TOTAL:(CT=Taxa Serviço)}'),'0.00')]

$[=F(TN('{REPORT TICKET TOTAL}')-TN('{REPORT CALCULATION TOTAL:(CT=Taxa Serviço)}')-TN('{REPORT CALCULATION TOTAL:(CT=Desconto)}'),'0.00')]
1 Like

You were right, I was missing the ' char!!!

Thanks!!!

1 Like

I added the $ in front of it so it would look like your report above it since it had the $.

1 Like

where do you change colors?

THANK YOU VERY MUCH!!!

G.

You can’t right now. What I did was to a Pivot table using Design mode and Brushes… but it does not save them so its pointless. For now at least

I moved 5 posts to a new topic: Log Entity State Action - Custom Data Syntax Broken

Just thought I would be the 100th post on this topic! No really I am having fun with these features.

1 Like