> For the complete documentation index, see [llms.txt](https://help.security.gallagher.com/knowledge-hub/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://help.security.gallagher.com/knowledge-hub/configuration-client/site-management/reports/creating-a-new-report/time-and-attendance-report/working-examples/example-2-first-event-is-an-exit-or-last-event-an-entry-detail-report.md).

# Example 2: First event is an Exit or last event an Entry (Detail Report)

In this example, the Cardholder’s first event within the Report Time-Frame is an Exit Event, and the Cardholder’s last event within the Report Time-Frame is an Entry Event.

### Raw Data

![](https://3000903572-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FfCvaxj3suxNBzdwQndVT%2Fuploads%2Fgit-blob-0c9a2003f73d4e09f94700d0b54102149b08e9ba%2Frawdata2.png?alt=media)

### Report Scenario 1

In this scenario we use the above raw data and set the following values when running the report.

| **Report Start Date-Time:** | Monday, 22 Jan 2007 00:00:00  |
| --------------------------- | ----------------------------- |
| **Report End Date-Time:**   | Tuesday, 23 Jan 2007 23:59:59 |
| **Maximum In-Zone Time:**   | 24hrs                         |

### Report Output

The time between the Report Start Date-Time (22 Jan) and the first event (an Exit Event) is 12.5hrs which does not exceed the Maximum In-Zone Time setting (24hrs) so an Attendance Record is created using the Report Start Date-Time as the assumed entry time.

Similarly, the time between the last event (an Entry Event) and the Report End Date-Time does not exceed the Maximum In-Zone Time setting so an Attendance Record is created using the Report End Date-Time as the assumed exit time.

Note that if the Maximum In-Zone Time had been set to say, 10hrs, then the first and last Attendance Records would NOT have been created because they exceed this length.

![](https://3000903572-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FfCvaxj3suxNBzdwQndVT%2Fuploads%2Fgit-blob-06f5ef295bd7cbe07b8bbbb9f7b95778bdfb69f1%2Freportoutput3.png?alt=media)

### Report Scenario 2

In this scenario we use the same raw data as in Scenario 1 but we use a different Report Time-Frame. We’ll report on the whole month (1 Jan – 31 Jan).

| **Report Start Date-Time:** | Monday, 1 Jan 2007 00:00:00     |
| --------------------------- | ------------------------------- |
| **Report End Date-Time:**   | Wednesday, 31 Jan 2007 23:59:59 |
| **Maximum In-Zone Time:**   | 24hrs                           |

### Report Output

The Cardholder’s first event within the Report Time-Frame is an Exit Event and the time between the Report Start Date-Time and this first event exceeds the Maximum In-Zone Time so no Attendance Record is created.

Similarly, the time between the last event (an Entry Event) and the Report End Date-Time exceeds the Maximum In-Zone Time setting so no Attendance Record is created.

![](https://3000903572-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FfCvaxj3suxNBzdwQndVT%2Fuploads%2Fgit-blob-6895ed8a58e1419d7b245f7c29ac2c4a1ff8d59a%2Freportoutput4.png?alt=media)

### Comments

Note that the same raw data has produced different Total Working Times in different reports. To minimize this effect, the Maximum In-Zone Time should be set as low as it can be set without excluding valid Attendance Records, and Report Time-Frames should be set to the minimum time-frame required to cover all the desired raw data.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://help.security.gallagher.com/knowledge-hub/configuration-client/site-management/reports/creating-a-new-report/time-and-attendance-report/working-examples/example-2-first-event-is-an-exit-or-last-event-an-entry-detail-report.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
