PHPackages                             bcmarketplace/module-custom-report-suite - 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. bcmarketplace/module-custom-report-suite

ActiveMagento2-module[Utility &amp; Helpers](/categories/utility)

bcmarketplace/module-custom-report-suite
========================================

BCMarketplace Custom Report Suite - Enterprise-grade custom SQL report builder with admin grid display and automated exports for Adobe Commerce 2.4.7+

2.2.2(5mo ago)06↓33.3%OSL-3.0PHPPHP ~8.2.0||~8.3.0

Since Dec 9Pushed 5mo agoCompare

[ Source](https://github.com/bcmarketplace/module-custom-report-suite)[ Packagist](https://packagist.org/packages/bcmarketplace/module-custom-report-suite)[ RSS](/packages/bcmarketplace-module-custom-report-suite/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (1)Dependencies (6)Versions (5)Used By (0)

 [![BCMarketplace Custom Report Suite Logo](screenshots/custom-report-suite-logo.png)](screenshots/custom-report-suite-logo.png)

BCMarketplace Custom Report Suite
=================================

[](#bcmarketplace-custom-report-suite)

**Version:** 2.2.2
**Compatibility:** Adobe Commerce 2.4.7-p6+ / Magento 2.4.7-p6+
**PHP:** 8.2+ / 8.3+
**Author:** Raphael Baako ()
**Company:** Baako Consulting LLC

Overview
--------

[](#overview)

BCMarketplace Custom Report Suite is an enterprise-grade module that enables administrators to create custom SQL-based reports directly from the Adobe Commerce admin panel. This module provides a powerful, flexible reporting solution with advanced features including automated exports, scheduled cron jobs, and comprehensive data visualization.

Functionality Demonstration
---------------------------

[](#functionality-demonstration)

Watch the GIF below to see the module's functionality in action:

 [![BCMarketplace Custom Report Suite - Functionality Demonstration](screenshots/custom-report-suite-vid.gif)](screenshots/custom-report-suite-vid.gif)

Features
--------

[](#features)

### Core Functionality

[](#core-functionality)

- **Custom SQL Report Builder**: Create reports using custom SQL queries with full admin grid integration
- **Admin Grid Display**: Native Magento admin grid with sorting, filtering, and pagination
- **CSV Export**: Export report data to CSV format
- **Excel XML Export**: Export report data to Excel-compatible XML format
- **Automated Exports**: Schedule automated report exports via cron jobs
- **Dynamic Cron Management**: Automatically create and manage cron jobs for scheduled exports
- **Filename Patterns**: Configurable filename patterns with date/time variables
- **Multi-Report Linking**: Link multiple custom reports to a single automated export

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

[](#installation)

### Via Composer (Recommended)

[](#via-composer-recommended)

```
composer require bcmarketplace/module-custom-report-suite
bin/magento module:enable BCMarketplace_CustomReportSuite
bin/magento setup:upgrade
bin/magento setup:di:compile
bin/magento setup:static-content:deploy -f
bin/magento cache:flush
```

### Manual Installation

[](#manual-installation)

1. Copy the module to `app/code/BCMarketplace/CustomReportSuite`
2. Run the following commands:

```
bin/magento module:enable BCMarketplace_CustomReportSuite
bin/magento setup:upgrade
bin/magento setup:di:compile
bin/magento setup:static-content:deploy -f
bin/magento cache:flush
```

Usage
-----

[](#usage)

### Creating a Custom Report

[](#creating-a-custom-report)

1. Navigate to **Reports &gt; Custom Reports &gt; Custom Reports** in the admin panel
2. Click **Add New Report**
3. Enter a **Report Name**
4. Enter your **SQL Query** (see SQL Query Guidelines below)
5. Click **Save**
6. Click **View Report** to see the results

### SQL Query Guidelines

[](#sql-query-guidelines)

- **SELECT statements only**: Only SELECT queries are supported
- **No DML operations**: INSERT, UPDATE, DELETE are not allowed
- **Column aliases**: Use meaningful column aliases as they become grid column headers
- **Performance**: Optimize queries for large datasets
- **Security**: Always use parameterized queries when possible (future enhancement)

**Example Query:**

```
SELECT
    o.increment_id AS 'Order Number',
    o.created_at AS 'Order Date',
    o.grand_total AS 'Total',
    CONCAT(c.firstname, ' ', c.lastname) AS 'Customer Name'
FROM sales_order o
INNER JOIN sales_order_address c ON o.entity_id = c.parent_id
WHERE o.status = 'complete'
ORDER BY o.created_at DESC
```

### Automated Exports

[](#automated-exports)

1. Navigate to **Reports &gt; Custom Reports &gt; Automated Exports**
2. Click **Add New Automated Export**
3. Configure:
    - **Title**: Name for the automated export
    - **Cron Expression**: Schedule (e.g., `0 2 * * *` for daily at 2 AM)
    - **Export Types**: Select export methods
    - **File Types**: Select file formats (CSV, XML)
    - **Filename Pattern**: Use variables like `%Y%`, `%m%`, `%d%`, `%reportname%`
    - **Export Location**: Directory path for exported files
    - **Custom Reports**: Select reports to include
4. Click **Save**

### Filename Pattern Variables

[](#filename-pattern-variables)

- `%d%` - Day (01-31)
- `%m%` - Month (01-12)
- `%y%` - Year (2 digits)
- `%Y%` - Year (4 digits)
- `%h%` - Hour (00-23)
- `%i%` - Minute (00-59)
- `%s%` - Second (00-59)
- `%W%` - Week number (01-53)
- `%reportname%` - Report name (lowercase, underscores)

**Example Pattern:** `sales_report_%Y%_%m%_%d%` → `sales_report_2024_01_15.csv`

Configuration
-------------

[](#configuration)

The module can be enabled or disabled from the admin panel:

1. Navigate to **Stores &gt; Configuration &gt; BCMarketplace &gt; Custom Report Suite**
2. Set **Enable Custom Report Suite** to Yes or No
3. When disabled, the menu items will be hidden from the admin navigation

[![Configuration - Enable Module](screenshots/configuration%20-%20enable.png)](screenshots/configuration%20-%20enable.png)

*Screenshot showing the configuration interface where administrators can enable or disable the Custom Report Suite module.*

Security Considerations
-----------------------

[](#security-considerations)

⚠️ **IMPORTANT**: This module executes custom SQL queries. Follow these security best practices:

1. **Access Control**: Only grant access to trusted administrators
2. **SQL Injection**: Always validate and sanitize SQL queries
3. **Read-Only**: The module is designed for SELECT queries only
4. **Audit Logging**: Monitor report creation and execution
5. **Database Permissions**: Use database user with minimal required permissions

### Query Validation and Restrictions

[](#query-validation-and-restrictions)

The module includes comprehensive SQL query validation to prevent malicious or dangerous queries. The following operations are automatically blocked:

- **Data Definition Language (DDL)**: ALTER TABLE, CREATE TABLE, DROP TABLE, TRUNCATE, etc.
- **Data Manipulation Language (DML)**: UPDATE, DELETE, INSERT, REPLACE
- **Stored Procedures and Functions**: CREATE/ALTER/DROP FUNCTION, CREATE/ALTER/DROP PROCEDURE
- **Database Operations**: ALTER DATABASE, CREATE DATABASE, DROP DATABASE
- **System Operations**: SET variables, GRANT/REVOKE permissions, FLUSH operations
- **File Operations**: INTO OUTFILE, INTO DUMPFILE, LOAD DATA INFILE
- **Cross-Database Access**: Queries accessing other databases or system tables
- **Multiple Statements**: Queries containing multiple SQL statements separated by semicolons

When a restricted query is attempted, the module displays a clear error message indicating which operation is not allowed. The screenshots below show examples of the security restriction messages that appear when various disallowed query types are attempted:

#### ALTER TABLE Restriction

[](#alter-table-restriction)

[![ALTER TABLE Restriction](screenshots/restriction-alter.png)](screenshots/restriction-alter.png)

#### DELETE Restriction

[](#delete-restriction)

[![DELETE Restriction](screenshots/restriction-delete.png)](screenshots/restriction-delete.png)

#### UPDATE Restriction

[](#update-restriction)

[![UPDATE Restriction](screenshots/restriction-update.png)](screenshots/restriction-update.png)

#### INSERT Restriction

[](#insert-restriction)

[![INSERT Restriction](screenshots/restriction-insert.png)](screenshots/restriction-insert.png)

#### DROP TABLE Restriction

[](#drop-table-restriction)

[![DROP TABLE Restriction](screenshots/restriction-drop.png)](screenshots/restriction-drop.png)

#### CREATE TABLE Restriction

[](#create-table-restriction)

[![CREATE TABLE Restriction](screenshots/restriction-create.png)](screenshots/restriction-create.png)

#### Multiple Statements Restriction

[](#multiple-statements-restriction)

[![Multiple Statements Restriction](screenshots/restriction-multiple-statements.png)](screenshots/restriction-multiple-statements.png)

#### INFORMATION\_SCHEMA Restriction

[](#information_schema-restriction)

[![INFORMATION_SCHEMA Restriction](screenshots/restriction-information-schema.png)](screenshots/restriction-information-schema.png)

#### Stored Procedure Restriction

[](#stored-procedure-restriction)

[![Stored Procedure Restriction](screenshots/restriction-stored-procedure.png)](screenshots/restriction-stored-procedure.png)

#### File Operations Restriction

[](#file-operations-restriction)

[![File Operations Restriction](screenshots/restriction-file-operations.png)](screenshots/restriction-file-operations.png)

These error messages clearly indicate which operation is not allowed and help prevent accidental or malicious database modifications.

Changelog
---------

[](#changelog)

### 2.2.2 (Current)

[](#222-current)

- Updated documentation with security restriction screenshots
- Enhanced README with comprehensive security examples

### 2.2.0

[](#220)

- Configuration system integrated with BCMarketplace Base module
- Module enable/disable functionality via admin configuration
- Conditional menu visibility based on module configuration

### 2.1.0

[](#210)

- Complete refactoring for Adobe Commerce 2.4.7-p6 compatibility
- Re-namespaced to BCMarketplace\\CustomReportSuite
- Removed deprecated code (Zend\_Db\_Expr, ObjectManager)
- Added strict typing and PHP 8.2+ compatibility
- Performance optimizations
- Enhanced error handling and logging

### 2.0.0

[](#200)

- Initial release

License
-------

[](#license)

- OSL-3.0
- AFL-3.0

Support
-------

[](#support)

For issues, questions, or contributions:

- **Email**:
- **Company**: Baako Consulting LLC

Acknowledgments
---------------

[](#acknowledgments)

This module was inspired by the Magento 1 Custom Reports extension by Kalen Jordan and contributors. Thank you to the original developers and the Magento community.

---

**Disclaimer**: This module executes custom SQL queries. Use at your own risk and ensure proper security measures are in place. The authors are not responsible for any data loss or security breaches resulting from improper use of this module.

###  Health Score

36

—

LowBetter than 82% of packages

Maintenance73

Regular maintenance activity

Popularity4

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity53

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% 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 ~1 days

Total

2

Last Release

152d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/65354e2ed5aad9fa5e5b5e992e303d18a3149bab4a99e4b71e4019e31fab0808?d=identicon)[bcmarketplace](/maintainers/bcmarketplace)

---

Top Contributors

[![bcmarketplace](https://avatars.githubusercontent.com/u/180615612?v=4)](https://github.com/bcmarketplace "bcmarketplace (14 commits)")

### Embed Badge

![Health badge](/badges/bcmarketplace-module-custom-report-suite/health.svg)

```
[![Health](https://phpackages.com/badges/bcmarketplace-module-custom-report-suite/health.svg)](https://phpackages.com/packages/bcmarketplace-module-custom-report-suite)
```

###  Alternatives

[mollie/magento2

Mollie Payment Module for Magento 2

1121.6M10](/packages/mollie-magento2)[baldwin/magento2-module-url-data-integrity-checker

Magento 2 module which can find potential url related problems in your catalog data

281773.3k](/packages/baldwin-magento2-module-url-data-integrity-checker)[dotdigital/dotdigital-magento2-extension

Dotdigital for Magento 2

50374.2k18](/packages/dotdigital-dotdigital-magento2-extension)[fredden/magento2-module-javascript-error-reporting

A Magento 2 module which captures JavaScript errors for later review by website administrators

3138.1k](/packages/fredden-magento2-module-javascript-error-reporting)[mage-os/module-inventory-reservations-grid

Add a grid with the list of inventory reservations.

126.8k](/packages/mage-os-module-inventory-reservations-grid)

PHPackages © 2026

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