# Time Clock - Basic Time Tracking

**URL:** <https://forum.sambapos.com/t/time-clock-basic-time-tracking/7149>\
**Category:** V5 Tutorial\
**Created:** [September 17, 2015, 7:25pm UTC](https://forum.sambapos.com/t/time-clock-basic-time-tracking/7149 "2015-09-17T19:25:02Z")\
**Posts on this page:** 20\
**Page:** 3

<div class="post-metadata">

**Author:** ![QMcKay](https://forum.sambapos.com/user_avatar/forum.sambapos.com/qmckay/32/27925_2.png) [@QMcKay](https://forum.sambapos.com/u/QMcKay)\
**Post date:** [December 28, 2015, 11:06pm UTC](https://forum.sambapos.com/t/time-clock-basic-time-tracking/7149/43 "2015-12-28T23:06:35Z")

</div>

> [@rightguys](#):
>
> I don’t know what the SQL code is.

That Report is calling 3 SQL Scripts.

```auto
@@EmployeePunchInLatest
@@EmployeeHoursDaily
@@EmployeeHoursTTL

```

The SQL scripts are in Automation \> Scripts …

 ![](https://forum.sambapos.com/uploads/default/original/3X/0/4/04d325f9615589f0dfea9354e9bd1a940fd4fdfd.png)

---

<div class="post-metadata">

**Author:** ![rightguys](https://forum.sambapos.com/letter_avatar_proxy/v4/letter/r/ad7895/32.png) [@rightguys](https://forum.sambapos.com/u/rightguys)\
**Post date:** [December 28, 2015, 11:07pm UTC](https://forum.sambapos.com/t/time-clock-basic-time-tracking/7149/44 "2015-12-28T23:07:40Z")

</div>

I just copied and pasted the code exactly the way you published them. I did not edit them in any way. Was I supposed to tailor them?

---

<div class="post-metadata">

**Author:** ![QMcKay](https://forum.sambapos.com/user_avatar/forum.sambapos.com/qmckay/32/27925_2.png) [@QMcKay](https://forum.sambapos.com/u/QMcKay)\
**Post date:** [December 28, 2015, 11:09pm UTC](https://forum.sambapos.com/t/time-clock-basic-time-tracking/7149/45 "2015-12-28T23:09:55Z")

</div>

No you don’t need to change the SQL Scripts at all.

It might be because you have no Entity State Logs yet. Need to wait to find out what @emre says regarding your other issue.

---

<div class="post-metadata">

**Author:** ![rightguys](https://forum.sambapos.com/letter_avatar_proxy/v4/letter/r/ad7895/32.png) [@rightguys](https://forum.sambapos.com/u/rightguys)\
**Post date:** [December 28, 2015, 11:13pm UTC](https://forum.sambapos.com/t/time-clock-basic-time-tracking/7149/46 "2015-12-28T23:13:08Z")

</div>

![](https://forum.sambapos.com/uploads/default/original/3X/4/e/4e3c4f4918bc76927b2514641b76cd73e18c10c0.png)  
 ![](https://forum.sambapos.com/uploads/default/original/3X/7/3/7300eb4ddf034418fc2d584dd6d542cf239d7e1d.png)  
 ![](https://forum.sambapos.com/uploads/default/original/3X/e/7/e742736cf45575735360616999f52d85ec1c46cc.png)  
 ![](https://forum.sambapos.com/uploads/default/original/3X/d/3/d313cbc4c49cc383d8a099662577bc1859794148.png)

---

<div class="post-metadata">

**Author:** ![QMcKay](https://forum.sambapos.com/user_avatar/forum.sambapos.com/qmckay/32/27925_2.png) [@QMcKay](https://forum.sambapos.com/u/QMcKay)\
**Post date:** [December 28, 2015, 11:14pm UTC](https://forum.sambapos.com/t/time-clock-basic-time-tracking/7149/47 "2015-12-28T23:14:51Z")

</div>

They look fine.

P.S. you can post images directly in the Forum instead of linking them remotely.

---

<div class="post-metadata">

**Author:** ![rightguys](https://forum.sambapos.com/letter_avatar_proxy/v4/letter/r/ad7895/32.png) [@rightguys](https://forum.sambapos.com/u/rightguys)\
**Post date:** [December 28, 2015, 11:19pm UTC](https://forum.sambapos.com/t/time-clock-basic-time-tracking/7149/48 "2015-12-28T23:19:06Z")

</div>

When I upload screenshots, I use imgur because, right after I press the PrtScn button, I can just press Ctrl+V right onto imgur’s site. There’s no need to open up a new image file on your desktop or anything.

---

<div class="post-metadata">

**Author:** ![rightguys](https://forum.sambapos.com/letter_avatar_proxy/v4/letter/r/ad7895/32.png) [@rightguys](https://forum.sambapos.com/u/rightguys)\
**Post date:** [December 28, 2015, 11:20pm UTC](https://forum.sambapos.com/t/time-clock-basic-time-tracking/7149/49 "2015-12-28T23:20:19Z")

</div>

Btw, the file is NOT uploading properly. Once the upload percentage hits ~50-60%, it resets back to 0%.

---

<div class="post-metadata">

**Author:** ![QMcKay](https://forum.sambapos.com/user_avatar/forum.sambapos.com/qmckay/32/27925_2.png) [@QMcKay](https://forum.sambapos.com/u/QMcKay)\
**Post date:** [December 28, 2015, 11:24pm UTC](https://forum.sambapos.com/t/time-clock-basic-time-tracking/7149/50 "2015-12-28T23:24:13Z")

</div>

> [@rightguys](#):
>
> I use imgur because, right after I press the PrtScn button, I can just press Ctrl+V right onto imgur’s site.

You can do the same thing in the text-edit window here, and it will upload the image file.

Prt Scr, then Ctrl-V right here…

 ![](https://forum.sambapos.com/uploads/default/original/3X/c/7/c7da45047bbb0bad5b6cd47eb173d6e73edb8463.png)

> [@rightguys](#):
>
> Btw, the file is NOT uploading properly. Once the upload percentage hits ~50-60%, it resets back to 0%.

Which Browser are you using?

---

<div class="post-metadata">

**Author:** ![rightguys](https://forum.sambapos.com/letter_avatar_proxy/v4/letter/r/ad7895/32.png) [@rightguys](https://forum.sambapos.com/u/rightguys)\
**Post date:** [December 28, 2015, 11:26pm UTC](https://forum.sambapos.com/t/time-clock-basic-time-tracking/7149/51 "2015-12-28T23:26:19Z")

</div>

> [@QMcKay](#):
>
> You can do the same thing in the text-edit window here, and it will upload the image file.
> 
> Prt Scr, then Ctrl-V right here…

That’s cool. I’ll do that next time.[quote=“QMcKay, post:50, topic:7149”]  
Which Browser are you using?  
[/quote]  
I’m using Firefox on my personal computer. I also tried uploading it from the POS’s server computer, which uses Chrome.

---

<div class="post-metadata">

**Author:** ![QMcKay](https://forum.sambapos.com/user_avatar/forum.sambapos.com/qmckay/32/27925_2.png) [@QMcKay](https://forum.sambapos.com/u/QMcKay)\
**Post date:** [December 28, 2015, 11:29pm UTC](https://forum.sambapos.com/t/time-clock-basic-time-tracking/7149/52 "2015-12-28T23:29:12Z")

</div>

I had to switch to using Chrome here when the forum software (Discourse) broke the file upload (Ctrl-V) in Firefox.

It was supposed to have been fixed, but it may have been broken again.

---

<div class="post-metadata">

**Author:** ![rightguys](https://forum.sambapos.com/letter_avatar_proxy/v4/letter/r/ad7895/32.png) [@rightguys](https://forum.sambapos.com/u/rightguys)\
**Post date:** [December 28, 2015, 11:34pm UTC](https://forum.sambapos.com/t/time-clock-basic-time-tracking/7149/53 "2015-12-28T23:34:17Z")

</div>

I swallowed my fanboyism and just used the latest Explorer (IE 11) and it still didn’t work.

---

<div class="post-metadata">

**Author:** ![QMcKay](https://forum.sambapos.com/user_avatar/forum.sambapos.com/qmckay/32/27925_2.png) [@QMcKay](https://forum.sambapos.com/u/QMcKay)\
**Post date:** [December 28, 2015, 11:34pm UTC](https://forum.sambapos.com/t/time-clock-basic-time-tracking/7149/54 "2015-12-28T23:34:52Z")

</div>

P.S. you could also use the SNIP tool to grab partial screens, so that your shots are smaller…

 ![](https://forum.sambapos.com/uploads/default/original/3X/e/0/e0d62c1893a4fe2ef2e75e484a4d105730b2d64b.png)

> [@rightguys](#):
>
> swallowed my fanboyism and just used the latest Explorer (IE 11)

LOL 🙂

---

<div class="post-metadata">

**Author:** ![emre](https://forum.sambapos.com/user_avatar/forum.sambapos.com/emre/32/39073_2.png) [@emre](https://forum.sambapos.com/u/emre)\
**Post date:** [December 29, 2015, 12:08am UTC](https://forum.sambapos.com/t/time-clock-basic-time-tracking/7149/55 "2015-12-29T00:08:52Z")

</div>

@rightguys thank you for backup. It saves settings just fine. Are you disabling design mode after changing settings? It saves when you disable it.

 ![](https://forum.sambapos.com/uploads/default/original/3X/3/f/3fd312c3bbba858b873e8a36e3f01ca8d52e7a69.png)

---

<div class="post-metadata">

**Author:** ![rightguys](https://forum.sambapos.com/letter_avatar_proxy/v4/letter/r/ad7895/32.png) [@rightguys](https://forum.sambapos.com/u/rightguys)\
**Post date:** [December 29, 2015, 12:16am UTC](https://forum.sambapos.com/t/time-clock-basic-time-tracking/7149/56 "2015-12-29T00:16:09Z")

</div>

First, I’d like to say, nice monitor resolution. Second, I don’t know if I am disabling disabling design mode. I’ll try that.

---

<div class="post-metadata">

**Author:** ![QMcKay](https://forum.sambapos.com/user_avatar/forum.sambapos.com/qmckay/32/27925_2.png) [@QMcKay](https://forum.sambapos.com/u/QMcKay)\
**Post date:** [December 29, 2015, 1:49am UTC](https://forum.sambapos.com/t/time-clock-basic-time-tracking/7149/57 "2015-12-29T01:49:26Z")

</div>

He just means this:

- Right-click and select `Design Mode`. A check will appear to the left of Design Mode.
- Click your Widget, then Right-click and select `Settings`.
- Make your changes, and click `Ok` at the bottom-right of the Settings Editor.
- Right-click and select `Design Mode`. The check will disappear.

The last step “disables” or “exits” Design Mode and saves your changes that you have made.

![](https://forum.sambapos.com/uploads/default/original/3X/8/7/8717c5888652d5de305ca5a6162d06b455abc0bc.png)

---

<div class="post-metadata">

**Author:** ![rightguys](https://forum.sambapos.com/letter_avatar_proxy/v4/letter/r/ad7895/32.png) [@rightguys](https://forum.sambapos.com/u/rightguys)\
**Post date:** [December 29, 2015, 1:52am UTC](https://forum.sambapos.com/t/time-clock-basic-time-tracking/7149/58 "2015-12-29T01:52:44Z")

</div>

Thank you so much guys. I now see the message. Only one problem, though. My clock-in report still shows an error message.

[http://forum.sambapos.com/uploads/default/original/3X/a/b/aba71f65a2b3cb73b10fc4374716f8d293dbfbf9.png](http://forum.sambapos.com/uploads/default/original/3X/a/b/aba71f65a2b3cb73b10fc4374716f8d293dbfbf9.png)

```
[Current Hours Daniel B.:13,12, 12, 12, 20, 16, 7]
@@EmployeePunchInLatest:Employee,Daniel B.

[Previous Hours Daniel B.:13,12, 12, 12, 20, 16, 7]
>Date|Day|Start|End|Hours|OT|H
@@EmployeeHoursDaily:Employee,Daniel B.
>@@EmployeeHoursTTL:Employee,Daniel B.
```

---

<div class="post-metadata">

**Author:** ![QMcKay](https://forum.sambapos.com/user_avatar/forum.sambapos.com/qmckay/32/27925_2.png) [@QMcKay](https://forum.sambapos.com/u/QMcKay)\
**Post date:** [December 29, 2015, 1:59am UTC](https://forum.sambapos.com/t/time-clock-basic-time-tracking/7149/59 "2015-12-29T01:59:08Z")

</div>

Find the error log and post it’s contents here in the forum. It is located at:

`[Documents]\SambaPOS5\log.txt`

---

<div class="post-metadata">

**Author:** ![rightguys](https://forum.sambapos.com/letter_avatar_proxy/v4/letter/r/ad7895/32.png) [@rightguys](https://forum.sambapos.com/u/rightguys)\
**Post date:** [December 29, 2015, 2:02am UTC](https://forum.sambapos.com/t/time-clock-basic-time-tracking/7149/60 "2015-12-29T02:02:02Z")

</div>

> [@QMcKay](#):
>
> Find the error log and post it’s contents here in the forum. It is located at:
> 
> `[Documents]\SambaPOS5\log.txt`

It’s not like Sambapos crashes or anything. The report itself gives an error message:  
`ExecuteReader: CommandText property has not been initialized.`

---

<div class="post-metadata">

**Author:** ![QMcKay](https://forum.sambapos.com/user_avatar/forum.sambapos.com/qmckay/32/27925_2.png) [@QMcKay](https://forum.sambapos.com/u/QMcKay)\
**Post date:** [December 29, 2015, 2:24am UTC](https://forum.sambapos.com/t/time-clock-basic-time-tracking/7149/61 "2015-12-29T02:24:51Z")

</div>

The same error should be in the log file.

Basically, it means the SQL is not executing properly for some reason. Probably has something to do with the way the parameters are being passed.

This is how it works.

 ![](https://forum.sambapos.com/uploads/default/original/3X/2/2/22c463dfc9fd149c4c684ee7daadc40d16356018.png)

Where you see in the SQL Script:

```auto
{Start} : replaced with Workperiod Start date/time
{End} : replaced with Workperiod End date/time
@1 : replaced with first parameter from Report, which is Employee
@2 : replaced with second parameter from Report, which is Daniel B.

```

So I can only guess, but what I would try at the very least, one at a time until it works:

- Ensure your Entity Type is called `Employee`.

![](https://forum.sambapos.com/uploads/default/original/3X/a/b/ab0a79302afd93c1d8306774daa44ee9af1605e5.png)

* * *

- Ensure you have started a Workperiod at least once. If you have no Workperiods, the report will fail. You do not need to be within a Workperiod to see the report, but at least 1 Workperiod must have existed in the past.

* * *

Try replacing in the SQL Script (the single quotes are mandatory):

```auto
'@1' with 'Employee'
'@2' with 'Daniel B.'

```

---

<div class="post-metadata">

**Author:** ![rightguys](https://forum.sambapos.com/letter_avatar_proxy/v4/letter/r/ad7895/32.png) [@rightguys](https://forum.sambapos.com/u/rightguys)\
**Post date:** [December 29, 2015, 2:52am UTC](https://forum.sambapos.com/t/time-clock-basic-time-tracking/7149/62 "2015-12-29T02:52:57Z")

</div>

> [@QMcKay](#):
>
> Ensure you have started a Workperiod at least once. If you have no Workperiods, the report will fail. You do not need to be within a Workperiod to see the report, but at least 1 Workperiod must have existed in the past.

There have been many Work Periods in the past.

> [@QMcKay](#):
>
> Ensure your Entity Type is called Employee.

The Entity Type is correctly spelt.

> [@QMcKay](#):
>
> @1 : replaced with first parameter from Report, which is Employee  
> @2 : replaced with second parameter from Report, which is Daniel B.

Tried this; didn’t work.

> [@QMcKay](#):
>
> {Start} : replaced with Workperiod Start date/time  
> {End} : replaced with Workperiod End date/time

Didn’t try this. How should I format the date/time?

[Previous page](https://forum.sambapos.com/t/time-clock-basic-time-tracking/7149.md?page=2)

[Next page](https://forum.sambapos.com/t/time-clock-basic-time-tracking/7149.md?page=4)
