reports

Create Frappe Report Builder, Query Reports, and Script Reports with SQL, Python, and JavaScript.

62|23|Updated Feb 7, 2026
One-click install
npx skills add https://github.com/lubusIN/frappe-skills --skill reports-lubusin
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: reports
Source: https://github.com/lubusIN/frappe-skills/tree/main/reports
Command: npx skills add https://github.com/lubusIN/frappe-skills --skill reports-lubusin

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Building data analysis views in Frappe requires choosing between three report types and knowing their distinct implementation patterns, from no-code Report Builder to SQL-based Query Reports and full Python + JS Script Reports. ## Core Features & Use Cases - Report Type Selection: Guidance on choosing between Report Builder (no code), Query Report (SQL), and Script Report (Python + JS) based on complexity needs. - Script Report Scaffolding: Complete file structure with JSON metadata, Python data logic, and JavaScript filters/formatters for app-bundled standard reports. - Charts and Print Formats: Add bar/line charts to reports and create custom HTML print layouts using Jinja templating. - Use Case: Build a Sales Summary report that groups orders by customer, computes totals and averages, filters by company and date range, renders a bar chart, and highlights high-value customers in green. ## Quick Start Create a Frappe Script Report named Sales Summary on the Sales Order DocType with company and date range filters, grouped totals per customer, and a bar chart.

Frequently Asked Questions about reports

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I create a Script Report in Frappe?▼

Create a Report document with Type set to Script Report and Is Standard set to Yes, then add a report folder in your app's module containing report_name.json, report_name.py, and report_name.js files. The Python file defines an execute(filters) function returning columns and data.

What is the difference between Query Report and Script Report in Frappe?▼

Query Reports use a single SQL query stored in the database and suit direct queries with joins and aggregations. Script Reports use Python for complex data logic and JavaScript for custom filters and formatters, and are bundled with apps for version control.

How do I add filters to a Frappe Query Report SQL query?▼

Define filters in the Report document or JS file, then reference them in SQL using %(filter_name)s parameter syntax. Wrap optional conditions in Jinja-style {% if filters.name %} blocks so they only apply when the filter has a value.

Why is my Frappe report not showing up after creation?▼

Standard reports not appearing usually indicate an incorrect module path or missing is_standard setting in the report JSON. Run bench migrate to sync the report files from your app into the site's database.

How do I prevent SQL injection in Frappe report filters?▼

Use parameterized queries with %(filter_name)s placeholders or frappe.db.escape() for user input instead of string concatenation. Frappe's database layer then safely escapes values before executing the query.

Can I add charts to a Frappe Script Report?▼

Yes, return a chart dictionary as the fourth element from the execute function alongside columns and data. The chart object specifies labels, datasets, and a type such as bar, which Frappe renders above the report grid.