Custom Reports
Build tailored reports using NetSuite's customization tools.
Custom Report Options
CUSTOM REPORT BUILDING OPTIONS
═══════════════════════════════════════════════════════════════════════════════
┌─────────────────────────────────────────────────────────────────────────────┐
│ Tool │ Best For │ Complexity │ Flexibility│
├─────────────────────┼─────────────────────────────┼────────────┼────────────┤
│ Report Builder │ Financial statement layouts │ Medium │ Medium │
│ Saved Search │ List-based operational data │ Low-Medium │ High │
│ Financial Layout │ Custom P&L, Balance Sheet │ Medium │ Medium │
│ SuiteAnalytics │ Dashboards & visualizations │ Low │ High │
│ SuiteQL │ Complex data analysis │ High │ Very High │
│ SuiteScript │ Fully custom reports │ Very High │ Unlimited │
└─────────────────────┴─────────────────────────────┴────────────┴────────────┘
Decision Guide:
┌─────────────────────────────────────────────────────────────────────────────┐
│ │
│ Need a financial statement format? → Report Builder / Financial Layout │
│ Need a list of records? → Saved Search │
│ Need charts and dashboards? → SuiteAnalytics Workbook │
│ Need complex joins/calculations? → SuiteQL │
│ Need complete control? → SuiteScript + HTML/PDF │
│ │
└─────────────────────────────────────────────────────────────────────────────┘
Report Builder
Overview
Create formatted reports with grouping, totals, and custom layouts.
Navigation: Reports → New Report
Building a Custom Report
REPORT BUILDER WORKFLOW
═══════════════════════════════════════════════════════════════════════════════
Step 1: Choose Report Type
┌─────────────────────────────────────────────────────────────────────────────┐
│ Category │ Examples │
├──────────────────┼──────────────────────────────────────────────────────────┤
│ Transaction │ Sales Orders, Invoices, Bills, Payments │
│ Entity │ Customers, Vendors, Employees │
│ Item │ Inventory Items, Service Items │
│ Financial │ P&L, Balance Sheet, Cash Flow │
└──────────────────┴──────────────────────────────────────────────────────────┘
Step 2: Select Columns
┌─────────────────────────────────────────────────────────────────────────────┐
│ Available Fields → Selected Columns │
│ ┌────────────────┐ ┌────────────────┐ │
│ │ □ Date │ → │ 1. Date │ │
│ │ □ Customer │ → │ 2. Customer │ │
│ │ □ Item │ → │ 3. Item │ │
│ │ □ Quantity │ → │ 4. Quantity │ │
│ │ □ Amount │ → │ 5. Amount │ │
│ └────────────────┘ └────────────────┘ │
└─────────────────────────────────────────────────────────────────────────────┘
Step 3: Add Filters
┌─────────────────────────────────────────────────────────────────────────────┐
│ Field │ Operator │ Value │
├──────────────────┼─────────────────┼────────────────────────────────────────┤
│ Date │ within │ This Fiscal Year │
│ Subsidiary │ is │ Main Company │
│ Status │ is not │ Cancelled │
└──────────────────┴─────────────────┴────────────────────────────────────────┘
Step 4: Configure Grouping & Sorting
┌─────────────────────────────────────────────────────────────────────────────┐
│ Group By: Customer │
│ Sort By: Amount (Descending) │
│ Show Subtotals: Yes │
│ Show Grand Total: Yes │
└─────────────────────────────────────────────────────────────────────────────┘
Step 5: Save & Schedule
┌─────────────────────────────────────────────────────────────────────────────┐
│ Report Name: Monthly Sales by Customer │
│ Category: Sales Reports │
│ Schedule: Monthly, 1st of month, 7:00 AM │
│ Recipients: sales-team@company.com │
└─────────────────────────────────────────────────────────────────────────────┘
Financial Report Layouts
Custom P&L Layout
Create custom Income Statement presentations.
Navigation: Customization → Financial Layouts → New
CUSTOM P&L LAYOUT EXAMPLE
═══════════════════════════════════════════════════════════════════════════════
Define Report Sections:
┌─────────────────────────────────────────────────────────────────────────────┐
│ Section │ Account Range │ Display Name │
├──────────────────┼────────────────────────┼─────────────────────────────────┤
│ Revenue │ 4000-4999 │ Revenue │
│ ├── Products │ 4000-4199 │ Product Revenue │
│ ├── Services │ 4200-4399 │ Service Revenue │
│ └── Other │ 4400-4999 │ Other Revenue │
│ ──────────────────────────────────────────────────────────────────────── │
│ COGS │ 5000-5999 │ Cost of Goods Sold │
│ ├── Materials │ 5000-5199 │ Direct Materials │
│ ├── Labor │ 5200-5399 │ Direct Labor │
│ └── Overhead │ 5400-5999 │ Manufacturing Overhead │
│ ──────────────────────────────────────────────────────────────────────── │
│ ** GROSS PROFIT │ (Calculated) │ Gross Profit │
│ ──────────────────────────────────────────────────────────────────────── │
│ Operating Exp │ 6000-6999 │ Operating Expenses │
│ ├── S&M │ 6000-6199 │ Sales & Marketing │
│ ├── G&A │ 6200-6399 │ General & Administrative │
│ └── R&D │ 6400-6999 │ Research & Development │
│ ──────────────────────────────────────────────────────────────────────── │
│ ** OPERATING INC │ (Calculated) │ Operating Income │
└─────────────────────────────────────────────────────────────────────────────┘
Saved Search as Reports
Converting Saved Search to Report
SAVED SEARCH REPORT FEATURES
═══════════════════════════════════════════════════════════════════════════════
Enable Report Features:
┌─────────────────────────────────────────────────────────────────────────────┐
│ ☑ Available as Report │
│ ☑ Available for Reminders │
│ ☑ Available as Email │
│ ☑ Available as Dashboard Portlet │
└─────────────────────────────────────────────────────────────────────────────┘
Report-Specific Options:
┌─────────────────────────────────────────────────────────────────────────────┐
│ Setting │ Options │
├──────────────────────┼──────────────────────────────────────────────────────┤
│ Report Title │ Custom title for report header │
│ Results Per Page │ 50, 100, 200, 500, 1000 │
│ Summary Types │ Group, Count, Sum, Average, Min, Max │
│ Chart Type │ Bar, Line, Pie, Area (if enabled) │
│ Conditional Format │ Highlight rows based on conditions │
└──────────────────────┴──────────────────────────────────────────────────────┘
Summary Reporting
SUMMARY SEARCH EXAMPLE
═══════════════════════════════════════════════════════════════════════════════
Search: Sales by Customer by Month
Summary Type: Group
Group By: Customer, Month
Results:
┌────────────────────┬──────────┬──────────┬──────────┬──────────┬──────────┐
│ Customer │ Oct 2024 │ Nov 2024 │ Dec 2024 │ Q4 Total │ % Change │
├────────────────────┼──────────┼──────────┼──────────┼──────────┼──────────┤
│ Acme Corporation │ $125,000 │ $142,000 │ $168,000 │ $435,000 │ +34.4% │
│ Global Industries │ $98,000 │ $87,000 │ $112,000 │ $297,000 │ +14.3% │
│ TechStart Inc │ $76,000 │ $82,000 │ $91,000 │ $249,000 │ +19.7% │
├────────────────────┼──────────┼──────────┼──────────┼──────────┼──────────┤
│ TOTAL │ $299,000 │ $311,000 │ $371,000 │ $981,000 │ +24.1% │
└────────────────────┴──────────┴──────────┴──────────┴──────────┴──────────┘
SuiteScript Custom Reports
Report Suitelet Pattern
/**
* @NApiVersion 2.1
* @NScriptType Suitelet
*/
define(['N/query', 'N/ui/serverWidget', 'N/file'], (query, serverWidget, file) => {
const onRequest = (context) => {
if (context.request.method === 'GET') {
showReportForm(context);
} else {
generateReport(context);
}
};
const showReportForm = (context) => {
const form = serverWidget.createForm({ title: 'Custom Sales Report' });
// Date range filters
form.addField({
id: 'custpage_startdate',
type: serverWidget.FieldType.DATE,
label: 'Start Date'
});
form.addField({
id: 'custpage_enddate',
type: serverWidget.FieldType.DATE,
label: 'End Date'
});
// Customer filter
form.addField({
id: 'custpage_customer',
type: serverWidget.FieldType.SELECT,
label: 'Customer',
source: 'customer'
});
// Output format
const formatField = form.addField({
id: 'custpage_format',
type: serverWidget.FieldType.SELECT,
label: 'Output Format'
});
formatField.addSelectOption({ value: 'html', text: 'View in Browser' });
formatField.addSelectOption({ value: 'csv', text: 'Download CSV' });
formatField.addSelectOption({ value: 'pdf', text: 'Download PDF' });
form.addSubmitButton({ label: 'Generate Report' });
context.response.writePage(form);
};
const generateReport = (context) => {
const params = context.request.parameters;
// Build query based on filters
const results = query.runSuiteQL({
query: `
SELECT
c.companyname AS customer,
t.tranid,
t.trandate,
t.foreigntotal AS amount
FROM transaction t
JOIN customer c ON t.entity = c.id
WHERE t.type = 'CustInvc'
AND t.trandate >= TO_DATE(?, 'YYYY-MM-DD')
AND t.trandate <= TO_DATE(?, 'YYYY-MM-DD')
ORDER BY t.trandate DESC
`,
params: [params.custpage_startdate, params.custpage_enddate]
}).asMappedResults();
// Output based on format
switch (params.custpage_format) {
case 'csv':
outputCSV(context, results);
break;
case 'pdf':
outputPDF(context, results);
break;
default:
outputHTML(context, results);
}
};
const outputHTML = (context, results) => {
let html = '<html><head><style>/* CSS styles */</style></head><body>';
html += '<h1>Sales Report</h1>';
html += '<table><tr><th>Customer</th><th>Invoice</th><th>Date</th><th>Amount</th></tr>';
results.forEach(row => {
html += `<tr>
<td>${row.customer}</td>
<td>${row.tranid}</td>
<td>${row.trandate}</td>
<td>$${row.amount}</td>
</tr>`;
});
html += '</table></body></html>';
context.response.write(html);
};
return { onRequest };
});
Report Best Practices
Performance Tips
| Practice | Benefit |
|---|---|
| Use date filters | Reduces data volume |
| Limit columns | Faster rendering |
| Use summary types | Less data transfer |
| Schedule large reports | Run off-peak hours |
| Cache when possible | Faster repeat access |
Design Guidelines
REPORT DESIGN CHECKLIST
═══════════════════════════════════════════════════════════════════════════════
☑ Clear, descriptive title
☑ Relevant filters (date, subsidiary, department)
☑ Logical column ordering
☑ Appropriate number formats
☑ Meaningful grouping and subtotals
☑ Grand totals where applicable
☑ Export options (CSV, PDF, Excel)
☑ Scheduled delivery if recurring
☑ Access restricted to appropriate roles
☑ Documentation of report purpose
Next Steps
| Goal | Go To |
|---|---|
| Return to overview | Reports Overview → |
| Learn SuiteQL | SuiteQL Guide → |
| Build Workbooks | Workbooks → |