How to make a report for a specific work period


I would like to know how to make a report that concerns the last working period.

I am using the action type Save Report to File with a daily trigger.

The problem (depending also of which sambapos version you use) is that if sambapos is running for 4 days in a row, I have:

  • Day 1: 1 report of day1
  • Day 2: 1 report from day 1 to day 2
  • Day 3: 1 report from day 1 to day 3

I would like to know how - inside the report itself - I can force the report to check the data of the last closed working period.

E.g. Working Period Report:

[Ventas:1, 1]

{REPORT TICKET TYPES:!PreOrder && TotalAmount >= 0}

[Pre Orders:1, 1]

{REPORT TICKET TYPES:PreOrder && TotalAmount >= 0}

[Refunds:1, 1]


[Pagos:2, 1, 2]

{REPORT PAYMENT DETAILS:P.Name,P.Amount.Percent,P.Amount.Sum:Payment.Amount > 0}

Total|{REPORT PAYMENT DETAILS:P.Amount.Sum:Payment.Amount > 0}

Is there some variable/parameters I can set inside the report in order that it returns the report of the last working period that was closed ?


The waiter closes the working period (at 2-3am) on a waiter TERMINAL.

The action “report” is executed (mapped to) on the SERVER, the manager computer.
And if sambapos has been running on the manager computer for 3 days without any actions of the manager, like logout/login, sambapos still “think” that the working period has not been closed, hence these bizarre message in red “don’t forget to close the working period” which is actually closed.
A logout/login solves that but in case of sending automatically, daily, at 5 am … reports are bizarre.

Are you actually closing work periods between days?

I updated my post

OK to solve your issue you could refresh the cache on each machine. I am fairly certain we have an action for that. Let me look


You could use a broadcast message to refresh cache on each terminal when work period is closed.

Several rule events to handle it.

:hushed: what is that ?
Is there related to the “message server”, I never understood what that was and I am not sure it’s running

It does yes and it’s an action that broadcasts across network that triggers a rule event if setup.

That reminds me the GOTO time :joy:

You could use it to logout user as well on server and all other terminals. We have a logout user action.

EDIT: Heck Work Period Ended event might even trigger that across network I have not tested that.

1 Like

I think I’ll use this one (and Cache refresh?)

Here is the rule event to capture the message.


Its Message Received event.

I might play with the message server one day but if it is possible to solve my problem without, better

If you run multiple terminals you should use message server because ticket states won’t update on screens otherwise


Is it running?

You should use it as a service on server machine. Go to your sambapos install folder on the server and there is a tool that will set it up and start the service.

Once setup in the screen your seeing now set name to your servers IP address and port you configured it to use in the tool. You need to do that for each terminal.

A green connected light will show up in bottom left.

I can do it live or I have to first close all terminals?
(that only might solved my report issue)

You can do it live it won’t mess anything.

Skip down to installing as a service

I do it then.
although …

My setup:


Same machine, 3 processes,
in Yellow : Terminal name = SERVER
in Red : Terminal name = CELIA
in Blue: Terminal Name = KARINA

So … IP for “terminals” will be; port 8080 for instance.

Your running 3 terminals on one machine? How does that work?

RDP from a tablet to the same machine with different windows users session (ABISTRO; Celia; Karina; and 2 more)

IOS or Android tablets I assume?