# Creating a custom report function

## Running a custom report within the reporting module

In addition to the [standard reports](/bittsy/data-output/standard-reports.md), the reporting module has an option for running a custom report. You will be able to write an additional report function that is used whenever you select this option on the user interface.

After the reporting module reaches its [first full release version](/bittsy/data-output/the-reporting-module.md#downloading-the-reporting-module), we intend to make it open-source. Instructions will be added to this page on how to add your own custom function or modify existing functions for your lab's general needs!

## Creating your own report from log files

Just like the reporting module's existing reports, you can pull necessary information to calculate and report measures of interest directly from [detailed log files](/bittsy/data-output/detailed-log-file.md) or via the [All Event Info](/bittsy/data-output/standard-reports.md#all-event-info) report type. You can use any programming language in which you have expertise (e.g. Python, MATLAB, Visual Basic in Excel) to parse, filter, locate/calculate values from log files. Feel free to make use of the community on our [Slack channel](https://app.slack.com/client/TB5CFBH6W/CB6979M2A) for any questions about working with log files or for inquiries about any similar custom scripts made by other researchers!

## Share your custom reporting function

Do you have a custom report function you have created to use with BITTSy logs? If you are willing to share it with other BITTSy users, we would love to make it available as a resource. You never know who will find it useful! Get in touch through our [contact form](https://docs.google.com/forms/d/e/1FAIpQLSc3U6Y2HNA4QIIzCWSPsRFK2ggBreS4jE82jt-U8E4zV6Xh3w/viewform) or on [Slack](https://join.slack.com/t/bittsysetup/shared_invite/zt-fgk0dqme-WqSDS51h1atlKI_uqUv9yA), and we will link your info here!


---

# Agent Instructions: Querying This Documentation

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

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://ldevumd.gitbook.io/bittsy/data-output/creating-a-custom-report-function.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
