While iVendNext provides pre-built operational reports, businesses often need tailored analytics to address unique challenges. This guide explores advanced reporting tools—including custom Report Builder templates, SQL Query Reports, and Python Script Reports—to unlock deeper insights.
Use these tools when you need:
✔ Data beyond standard reports (e.g., profit margins by region).
✔ Complex calculations (e.g., inventory turnover ratios).
✔ Automated workflows (e.g., low-stock alerts).
No coding required – Drag-and-drop interface.
Child table support – Pull data from linked tables (e.g., invoice items).
Save & reuse – Create templates for recurring needs.
Navigate to Home > Customizations > Reports > Report Builder.
Click New, select "Sales Invoice" as the doctype.
Add fields:
Parent table: Customer Name, Grand Total.
Child table (Invoice Items): Item Code, Qty, Rate.
Apply filters (e.g., "Status = Paid").
Save as "High-Value Sales Report."
Multi-table joins (e.g., sales + inventory data).
Custom aggregations (e.g., average basket size by store).
SELECT
item.item_name,
SUM(invoice_item.amount) AS total_revenue
FROM `tabSales Invoice Item` AS invoice_item
JOIN `tabItem` AS item ON invoice_item.item_code = item.item_code
GROUP BY item.item_name
ORDER BY total_revenue DESC
LIMIT 10;
Steps to Implement:
Go to Home > Customizations > Reports > Query Report.
Paste the SQL query, test with "Run."
Save as "Top 10 Products by Revenue."
Dynamic logic (e.g., apply discounts based on rules).
External integrations (e.g., pull weather data for sales correlation).
def execute(filters=None):
columns = ["Item", "Warehouse", "Qty", "Reorder Level"]
data = frappe.db.sql("""
SELECT item.item_name, bin.warehouse, bin.actual_qty, item.reorder_level
FROM `tabBin` AS bin
JOIN `tabItem` AS item ON bin.item_code = item.item_code
WHERE bin.actual_qty < item.reorder_level
""")
return columns, data
Steps to Implement:
Navigate to Script Report under Customizations.
Enter the Python code, set filters (e.g., warehouse).
Schedule to run daily and email to managers.
🔹 Reuse Scripts – Save frequently used queries as templates.
🔹 Limit Data – Use filters to avoid slow performance.
🔹 Test Safely – Run scripts in development mode first.
iVendNext’s advanced tools—Report Builder, SQL Queries, and Python Scripts—let you:
✔ Build reports tailored to your workflows.
✔ Automate data-driven decisions.
✔ Go beyond standard analytics.