]project-open[ : @This Wiki
Portrait

Welcome, Unregistered Visitor

Contact ·  Index · Login · Register
 

Contents

Remote Training
Support
SaaS Service

5 registered users
 in last 24 hours

Write a report using ]po['s reporting engine

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.  ­

Elements of a typical report

SQL

The sql statement defines content and grouping of a report.

Report Definition

 

­

All report are defined by:

  • group-by clause
  • header definition
  • content definition
  • footer definition

List of all counters

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 \
]

Counter definition

Sample:
set quote_subsubtotal_counter [list pretty_name "Quote Amount" var quote_subsubtotal reset \$project_id expr "\$quote_amount+0"]

Principal methods used

im_report_render_header

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.

im_report_display_footer

Display the footer stack of a single row in a project-open report.

im_report_update_counters

Takes a definition of the report counters and update the counter values according to the variables in the parent frame




­

Please take a moment to complete this form to help us improve our service.

Note:
Please only provide feedback in regards to content this page shows. For support inquiries please refer either to the Community Support forum at Sourceforge or check out our 'Professional Support'

Did this page help you to achieve your goal?

 Yes  No  Don't know

Please provide us with comments to improve this page:

How useful is the information?

 1  2  3  4  5
Not
useful
      Extremely
useful
 
  

Explore

Installers
Demo Server
Modules & Functionality
Packages
Business Processes supported
FAQ's

Help

Getting started
User Manuals
Configuration Manuals
Community Support
Professional Support

News

News
Twitter
RSS Community / Sourceforge
Register for Newsletter

Get in touch

Contact
Register



Creative Commons License This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 2.0 Generic License - Privacy Policy