Package [package-intranet-reporting-tutorial|intranet-reporting-tutorial] contains some sample reports that show the structure of typical ]po[ reports.
They are a good starting point to get familiar with programming reports.
The sql statement defines content and grouping of a report.
All report are defined by:
set counters [list \ $invoice_subsubtotal_counter \ $delnote_subsubtotal_counter \ $quote_subsubtotal_counter \ $bill_subsubtotal_counter \ $po_subsubtotal_counter \ $expense_subsubtotal_counter \ $timesheet_subsubtotal_counter \ $invoice_subtotal_counter \ $delnote_subtotal_counter \ $quote_subtotal_counter \ $bill_subtotal_counter \ $po_subtotal_counter \ $expense_subtotal_counter \ $timesheet_subtotal_counter \ $invoice_total_counter \ $delnote_total_counter \ $quote_total_counter \ $bill_total_counter \ $po_total_counter \ $expense_total_counter \ $timesheet_total_counter \ ]
set quote_subsubtotal_counter [list pretty_name "Quote Amount" var quote_subsubtotal reset \$project_id expr "\$quote_amount+0"]
Renders a single row in a project-open report.The procedure takes a report definition, an array of the "last_values" (from the last row) and the current variables via upvar and writes a report line to the page via ns_write.
Returns an array of the new values for the current row.
Display the footer stack of a single row in a project-open report.
Takes a definition of the report counters and update the counter values according to the variables in the parent frame