The AppGini Blog
A few tips and tricks to make your coding life a tiny bit better.

How to Add Smart Report Maker Dashboards to AppGini

AppGini + Smart Report Maker Dashboards

If you’re using AppGini to build web database applications without coding, you’ll eventually want dashboards, KPIs, and richer reporting than basic table views.

In this guide, you’ll learn how to:

This gives you a repeatable pattern you can reuse for any AppGini app—CRM, inventory management, donor tracking, or other business applications.


Why Combine AppGini and Smart Report Maker?

AppGini: No‑Code Web Database Applications

AppGini app screenshot showing table view

AppGini is designed to generate secure, responsive, multi‑user web apps without coding. You define tables and relationships; it generates a full CRUD application you can deploy to any common LAMP hosting. From the AppGini product page, key benefits include:

  • No coding needed: design tables & relationships using a GUI
  • Team‑ready: built‑in user groups and granular permissions
  • Full ownership: host on your own server, no vendor lock‑in or per‑user fees

To see a real example of an AppGini app in action, check the live Northwind AppGini demo. If you’d like to experiment locally, you can download the latest project from Northwind AppGini demo releases on GitHub.

For more AppGini tips and tutorials, the AppGini blog is a great resource. In particular, the post Dashboards and charts for AppGini using Smart Report Maker gives a high‑level introduction to this integration.

Smart Report Maker: PHP Dashboards and Reports for MySQL

Smart Report Maker example dashboard

Smart Report Maker (SRM) is a no‑code PHP report, chart, and dashboard builder for MySQL. It lets you:

  • Build MySQL reports, PHP dashboards, KPIs, and charts
  • Create MySQL pivot tables using a visual drag‑and‑drop editor
  • Design multi‑level drill‑down flows via report linking & chaining
  • Embed reporting and dashboards directly in apps using the Embed Manager

For AppGini users, SRM is often the missing layer of advanced AppGini reporting and AppGini dashboards.

If you’d like to buy SRM, there is a special 40% discount exclusively for AppGini users:

Smart Report Maker special offer for AppGini users (40% off)

This deal is perfect if you’re building dashboards for a production AppGini app.


Scenario: A Northwind‑Style AppGini Application

We’ll base this tutorial on the familiar Northwind schema. You can:

Needed tables for this tutorial

  • orders
  • customers

Typical fields (adjust to your actual schema)

  • orders: order_id, customer_id, employee_id, order_date, required_date, shipped_date, ship_via, freight, ship_country, ship_city
  • customers: customer_id, company_name, contact_name, country, city, region, phone, email, address, postal_code

Our goal is to build AppGini dashboards powered by Smart Report Maker that answer questions like:

Q1- How many orders in the last 30 days compared to the previous period?
Q2- How many orders in the last 3 months compared to the previous period?
Q3- How many customers do we have compared to the target?
Q4- How many countries have active sales compared to the target?
Q5- What is the daily sales performance over the last 30 days?
Q6- What is the sales breakdown by country and quarter?


8-Step Overview: Embedding Smart Report Maker into AppGini

  1. Connect Smart Report Maker to your AppGini database.
  2. Create an SRM group for your AppGini analytics.
  3. Create an SRM embed access key.
  4. Create the reports, charts, and other analytical resources you’ll need later to display as widgets on your dashboards.
  5. Build the Sales Overview dashboard in SRM using the created widgets.
  6. Configure SRM’s Embed Manager to use AppGini’s login and layout.
  7. Generate PHP embed files and place them in AppGini’s hooks/ folder.
  8. Add home page tiles and menu links inside AppGini.

Note:
Below is a detailed breakdown of each step mentioned in the previous point to help you implement the dashboards in a clear and structured way.


Step-by-Step Integration Guide

In this section, we’ll walk through each of the 8 integration steps mentioned above in a clear and detailed way, so you can implement the Smart Report Maker + AppGini integration confidently from start to finish.

Step 1 – Connect Smart Report Maker to Your AppGini Database

Because SRM is a self‑hosted PHP reporting tool for MySQL, it runs on the same hosting environments AppGini apps use (shared hosting, VPS, or dedicated servers with cPanel, Plesk, etc.).

  1. Log in to your Smart Report Maker installation.

  2. Go to Settings → Data Connections.

  3. Click Add New Connection.

  4. Enter the same MySQL credentials used by your AppGini app (you’ll find them in the generated config.php):

    • Database name
    • MySQL host
    • Username
    • Password

    Smart Report Maker add new data connection

After saving, SRM can see all your AppGini tables and is ready to build:

  • PHP dashboards for MySQL
  • MySQL pivot tables
  • Scheduled MySQL reports
  • Interactive charts and KPIs

Step 2 – Create an SRM Group for Your AppGini App

  1. In SRM, go to Settings → Users → Groups.
  2. Click Add Group.
  3. Name it: Northwind App Analytics.
  4. Save it.

Step 3 – Create an SRM Embed Access Key

Smart Report Maker Embed Manager

To embed SRM dashboards as part of your AppGini app, use the Embed Manager.

  1. In SRM, go to Access Control → Embed Manager.

  2. Click Create New Access Key.

  3. Use settings like:

    • Label: Northwind App – Embed Key
    • Type: Limited
    • Group: Northwind App Analytics
  4. Restrict the allowed origin:

    • If AppGini and SRM share the same domain, restrict to same origin.
    • If not, specify the AppGini URL (e.g., https://northwind.example.com).

You’ll use this single key for all your embedded dashboards and reports.


Step 4 – Create the Reports, Charts, and Analytical Resources

In Smart Report Maker, creating a dashboard starts with building each widget individually based on its type. Once the widgets are created, you can easily add them to any dashboard.

In this example, since the dashboard needs to answer six questions, we will use different types of widgets depending on the question being answered, as follows:

  • KPIs (Metrics) for Questions 1 through 4
  • Chart for Question 5
  • Pivot Table for Question 6

4.1 Creating a KPI / Metric in SRM

Since questions 1 through 4 each require a separate metric, we will create four metrics in total. You can either run the same wizard four times to create each metric, or create the first metric once, then duplicate it three times and only change the values in the last step of the wizard.

Go to the KPI section in the left panel and click Add New Metric. This will launch a simple, user-friendly wizard to help you configure your metric.

Go to the KPI section in the left panel and click Add New Metric.
This will launch a simple, user-friendly wizard to help you configure your metric.

The wizard consists of three configuration screens.

4.1.1 Appearance

In this screen, you define how the metric will look.
For this tutorial, select the Info Box style.

Smart Report Maker Metrics

4.1.2 General Settings

Here, you configure the metric’s name and title.
For example, use Last 30 Days Orders as the title.

Then:

  • Select the database connection you created in Step 1
  • Set Security to Private
  • Assign the resource to the group Northwind App Analytics

4.1.3 Data Configuration

This screen defines how the KPI data is calculated.

For questions 1 through 4, use the following settings:

  • Performance Data Table:
    • Orders table for Orders related questions (questions 1, 2 and 4)
    • Customers for customers questions (question 3)
  • Performance Column:
    • order_id for Q1 and Q2
    • customer_id for Q3
    • ship_country for Q4
  • Calculation Function: Count Distinct
  • Performance Direction: Increase is better
  • Date Filter Column: order_date
  • Display Format: Numeric value
  • Comparison options:
    • Compare with the preceding period
    • Or a fixed target (if you have one)
    • Or Same Time Last Year

4.1.4 Drill-Down Option

To allow users to click the KPI and view detailed data:

  • Enable Drill Down
  • Select the columns to appear in the drill-down report

4.2 Creating a Chart in SRM

Go to the Charts section in the left panel and click Add New Chart.
This will launch a simple, user-friendly wizard to help you configure your chart.

The wizard consists of three configuration screens.

4.2.1 Chart Type & Layout

Choose:

  • Layout: Full Page
  • Chart Type: Time Series

Smart Report Maker chart Builder

4.2.2 General Settings

Configure:

  • Chart name and title
  • Database connection you created in Step 1
  • Security: Private
  • Group: Northwind App Analytics

4.2.3 Data Configuration

Since this is a time-series chart, configure the axes as follows.

X-Axis (Time Axis)

  • Table: Orders
  • Column: order_date
  • Date Range: Last 30 days
  • Time Scale: Days

Y-Axis (Values Axis)

  • Table: Orders
  • Column: order_id
  • Function: Count
  • Label: Order Count per Day

4.2.4 Drill-Down Option

Enable Drill Down to allow users to click any day
and open a report showing all orders for that day.

4.3 Creating a Pivot Table in SRM

Go to the Pivot Tables section in the left panel and click Add New Pivot Table.

SRM provides a drag-and-drop pivot table editor, making it easy to build pivot tables without writing any SQL.

4.3.1 Select the Database Connection

Before designing the pivot table layout, select a database connection.

For this tutorial:

  • Choose the connection you configured in Step 1

Once selected, all tables and columns from that connection will appear in the editor.

4.3.2 Build the Pivot Layout (Drag & Drop)

Configure the pivot table by dragging columns into the appropriate areas.

Row Header

  • Drag ship_country into the Row Header section

Column Header

  • Drag order_date into the Column Header section
  • Set the date grouping to Quarter

Values

  • Drag order_id into the Values section
  • Select the Count function

4.3.3 Add Parameters

You can add parameters for the end user to filter the pivot table, such as:

  • ship_country
  • order_date

Smart Report Maker Pivot table Builder

4.3.4 Apply and Configure Options

Click Apply to generate and preview the pivot table.

Then go to the Options tab:

  • Set Security to Private
  • Assign the pivot table to the group Northwind App Analytics

4.3.5 Save the Pivot Table

Give the pivot table a name.
Click Save to store it.


Step 5 – Build the Sales Overview Dashboard in SRM

After creating all the widgets (KPIs, charts, and pivot tables),
you are now ready to assemble them into a dashboard.

5.1 Create a New Dashboard

  • Go to the Dashboard section in the left panel
  • Click Add Dashboard
  • Enter a name and choose an icon for the dashboard
  • Click Save

5.2 Add Widgets to the Dashboard

In the Dashboard Management table:

  • Click the newly created dashboard
  • Click Add Widgets

Then add each widget type.

5.2.1 Add Chart

  • Select Chart
  • Add the chart you created earlier

Adding widgets to the dashboard

5.2.2 Add KPIs

  • Select KPI
  • Add the metrics you created earlier

5.2.3 Add Pivot Table

  • Select Pivot Table
  • Add the pivot table you created earlier

Once all widgets are added,
your Sales Overview dashboard is complete.


Step 6 – Use AppGini Login and Layout for SRM Dashboards

AppGini has a powerful hooks system that lets you extend functionality without touching core files. We’ll leverage this so that:

  • Access is controlled by AppGini’s login
  • Dashboards appear within AppGini’s header/menu/footer

In SRM:

  1. Go to Embed Manager → Embed Preferences.

  2. You’ll see two code areas:

    • Custom PHP Code Before Embed
    • Custom PHP Code After Embed

    Smart Report Maker Embed Preferences

6.1 – “Before Embed” Code

Paste this into Custom PHP Code Before Embed:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
// AppGini + Smart Report Maker integration
// Adjust PREPEND_PATH if embed files are not directly inside the "hooks" folder.
define('PREPEND_PATH', '../');
define('APP_ROOT', __DIR__ . '/' . PREPEND_PATH);

// Load AppGini core
include(APP_ROOT . 'lib.php');

// Enforce AppGini authentication
if(Authentication::isGuest()) {
    header('Location: ' . PREPEND_PATH . 'index.php?signIn=1');
    exit;
}

// Include AppGini header (navigation + theme)
include_once(APP_ROOT . 'header.php');

Do not add <?php or ?> around this; SRM wraps it automatically.

6.2 – “After Embed” Code

Paste this into Custom PHP Code After Embed:

1
include_once(APP_ROOT . 'footer.php');

Now every SRM resource (dashboard, report, pivot table) embedded via PHP will:

  • Require AppGini login
  • Render with the AppGini template and navigation

Step 7 – Generate PHP Embed Files and Place Them in hooks/

Repeat this process for each SRM dashboard you want in AppGini.

Example: Sales Overview Dashboard Embed

  1. In SRM, go to Embed Manager → Embed Resources.

  2. Choose:

    • Resource Type: Dashboard
    • Resource: Sales Overview
    • Access Key: Northwind App – Embed Key
    • Embed Type: PHP Embed
  3. Generate the PHP embed file (e.g., embed_dashboard_101.php).

  4. Rename it for clarity:

    1
    
    srm-dashboard-sales-overview.php
    
  5. Upload that file into your AppGini app’s hooks folder:

    1
    2
    3
    
    your-app/
      hooks/
        srm-dashboard-sales-overview.php
    

These PHP files are now ready to serve as AppGini dashboard pages.


AppGini lets you expose custom pages (like your SRM dashboards) in both the home page tiles and the navigation menu.

8.1 – Add The Sales Overview DashboardDashboard on the Home Page

Open:

1
your-app/hooks/links-home.php

Add:

1
2
3
4
5
6
7
// Sales Overview dashboard tile
$homeLinks[] = array(
    'url' => 'hooks/srm-dashboard-sales-overview.php',
    'title' => 'Sales Overview Dashboard',
    'description' => 'Monthly sales trends, top customers, and category performance.',
    'groups' => array('*')
);

Save and refresh your AppGini home page—you’ll see three new tiles linking to your SRM‑powered AppGini dashboards.

8.2 – Add The Sales Overview dashboard to the Navigation Menu

Open:

1
your-app/hooks/links-navmenu.php

Add:

1
2
3
4
5
6
7
// Sales Overview in navigation
$navLinks[] = array(
    'url' => 'hooks/srm-dashboard-sales-overview.php',
    'title' => 'Sales Overview',
    'groups' => array('*'),
    'icon' => '' // optional icon class
);

Now your Smart Report Maker AppGini dashboard are accessible from anywhere in the app via the main menu.


To deepen your understanding and discover more ideas:


FAQ: Smart Report Maker Dashboards for AppGini

1. What is Smart Report Maker and why use it with AppGini?
Smart Report Maker (SRM) is a PHP tool for building MySQL reports, dashboards, charts, and pivot tables without coding. When you combine it with AppGini, you get advanced analytics and dashboards embedded directly inside your AppGini app’s interface and security model.

2. Do I need to write PHP code to integrate Smart Report Maker with AppGini?
You only need to add a few small PHP snippets in SRM’s Embed Manager and drop the generated PHP embed files into AppGini’s hooks/ folder. There’s no need to modify AppGini core files, and most of the work is done through SRM’s visual interface.

3. How do I try this with the Northwind sample app?
You can:

Then connect Smart Report Maker to the same database and follow the steps from the article.

4. Is there a discount for AppGini users who buy Smart Report Maker?
Yes. AppGini users get an exclusive 40% discount on Smart Report Maker through this link:

This is the recommended purchase link if you’re using SRM with AppGini.

5. Where can I find an official guide to SRM dashboards with AppGini?
The AppGini team published an overview here:

It gives a concise introduction and context for the integration.

6. Will SRM dashboards respect AppGini logins and permissions?
Yes. By using the provided “before embed” and “after embed” PHP snippets, SRM dashboards:

  • Require users to be logged in via AppGini
  • Render inside AppGini’s header/footer and navigation

You can also use AppGini’s links-home.php and links-navmenu.php to control which user groups see each dashboard.

7. Can I reuse this setup for other AppGini projects besides Northwind?
Absolutely. Once you understand the pattern:

  1. Connect SRM to your project’s MySQL database.
  2. Build the needed dashboards/reports in SRM.
  3. Generate PHP embed files.
  4. Place them in the project’s hooks/ folder and add home/menu links.

The same approach works for any AppGini app: you just change the tables, fields, and dashboard logic in SRM.


Summary: A Reusable AppGini Reporting Pattern with Smart Report Maker

By combining AppGini and Smart Report Maker, you get:

  • A no‑code web database application with secure multi‑user access
  • Embedded PHP dashboards for MySQL
  • A clean, upgrade‑safe implementation using:
    • SRM’s Embed Manager and role‑based access
    • AppGini’s hooks (links-home.php, links-navmenu.php, custom pages in hooks/)

Any time you need a new AppGini dashboard, MySQL pivot table, or advanced PHP report:

  1. Build it visually in Smart Report Maker.
  2. Generate a PHP embed file.
  3. Drop it into AppGini’s hooks/ folder and link it from the home page or menu.

If you’re just getting started, try the Northwind AppGini demo with Smart Report Maker, then grab the Northwind project from GitHub and experiment locally. When you’re ready for production, consider the Smart Report Maker 40% AppGini discount to unlock powerful, self‑hosted analytics for your AppGini apps.

Smart Report Maker special offer for AppGini users (40% off)