PHPackages                             peet86/craft-reports - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. peet86/craft-reports

ActiveCraft-plugin[Utility &amp; Helpers](/categories/utility)

peet86/craft-reports
====================

Reports for Craft 3

1.0.1(8y ago)06PHP

Since May 23Pushed 7y ago1 watchersCompare

[ Source](https://github.com/peet86/craft-reports)[ Packagist](https://packagist.org/packages/peet86/craft-reports)[ RSS](/packages/peet86-craft-reports/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (2)Versions (4)Used By (0)

Reports plugin for Craft CMS
============================

[](#reports-plugin-for-craft-cms)

Write reports with Twig.

[![Screenshot](resources/icon.png)](resources/icon.png)

Installation
------------

[](#installation)

To install Reports, follow these steps:

1. Download &amp; unzip the file and place the `reports` directory into your `craft/plugins` directory
2. Install plugin in the Craft Control Panel under Settings &gt; Plugins
3. The plugin folder should be named `reports` for Craft to see it.

Reports works on Craft 2.4.x and higher;

Reports Overview
----------------

[](#reports-overview)

Reports allow you to collect data by writing Twig tags as normal. All you need to in the end is pass that data to the `.prepare()` method, like the following example:

Example report in Twig:

```
{% set newsCount = craft.entries.section('news').limit(null).total() %}
{{ craft.reports.prepare({
    columns: ['Total news entries'],
    rows: [ [ newsCount ] ]
}) }}
```

List all users in a specific user group that have logged in within the last 30 days:

```
{% set loginPeriod = now|date_modify('-30 days') %}
{% set users = craft.users.group('clients').lastLoginDate('> ' ~ loginPeriod) %}
{% set userRows = [] %}
{% for user in users %}
    {% set userRows = userRows|merge([ [user.username, user.getName(), user.email] ]) %}
{% endfor %}

{{ craft.reports.prepare({
    columns: ['Username', 'Name', 'Email'],
    rows: userRows
}) }}
```

The result is available in the control panel, or as a CSV export.

You can register report types from other plugins and use templates for both options and results:

```
public function registerReports()
{
    $types = [];
    $folders = IOHelper::getFolders(craft()->path->getPluginsPath().'tester/templates/reports/');

    foreach($folders as $folder){
        $name = IOHelper::getFolderName($folder, false);
        $types[$name] = 'reports/'.$name;
    }

    return $types;
}
```

Use the reports forms variable to access cp forms macros

```
{{ craft.reports.forms('dateTimeField', {
	id: 'startDate',
    label: "Start Date"|t,
    name: 'options[startDate]',
    value: options.startDate
}) }}
```

The options variable is now available in the results.twig

folder structure:

```
templates
    reports
        reportType
            results.twig
            settings.twig
```

Based on the work by [Superbig](https://superbig.co)

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity65

Established project with proven stability

 Bus Factor1

Top contributor holds 80% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~27 days

Total

2

Last Release

3245d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/e6596f2592be645f53927783bdddb10639d789a10e7fcc0ad88def5bffda851c?d=identicon)[peet86](/maintainers/peet86)

---

Top Contributors

[![sjelfull](https://avatars.githubusercontent.com/u/10508?v=4)](https://github.com/sjelfull "sjelfull (16 commits)")[![peet86](https://avatars.githubusercontent.com/u/598962?v=4)](https://github.com/peet86 "peet86 (4 commits)")

### Embed Badge

![Health badge](/badges/peet86-craft-reports/health.svg)

```
[![Health](https://phpackages.com/badges/peet86-craft-reports/health.svg)](https://phpackages.com/packages/peet86-craft-reports)
```

###  Alternatives

[civicrm/civicrm-core

Open source constituent relationship management for non-profits, NGOs and advocacy organizations.

728272.9k17](/packages/civicrm-civicrm-core)[rainlab/blog-plugin

Blog plugin for October CMS

17257.7k](/packages/rainlab-blog-plugin)[rainlab/builder-plugin

Builder plugin for October CMS

17147.2k1](/packages/rainlab-builder-plugin)[pfefferle/wordpress-activitypub

The ActivityPub protocol is a decentralized social networking protocol based upon the ActivityStreams 2.0 data format.

5671.4k1](/packages/pfefferle-wordpress-activitypub)[civicrm/civicrm-drupal-8

Open source constituent relationship management for non-profits, NGOs and advocacy organizations.

18238.1k2](/packages/civicrm-civicrm-drupal-8)[mediawiki/semantic-glossary

A terminology markup extension with a Semantic MediaWiki back-end

1352.4k](/packages/mediawiki-semantic-glossary)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
