Custom Report Tags in detail


#81

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


Syntax Behavior with {ENTITY DATA:X}
#82

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.


#83

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.


#84

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.


#85

@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)]


#86

@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.


#87

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


#88

Lol @kendash 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.


#89

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


#90

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.


#91

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


#92

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)


#93

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.


#94

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')]

#95

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

Thanks!!!


#96

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


#97

where do you change colors?

THANK YOU VERY MUCH!!!

G.


#98

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


#99

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


Syntax Behavior with {ENTITY DATA:X}
#100

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


Syntax Behavior with {ENTITY DATA:X}