Graphs

graphs.pl shows how you can easily build graphs (bar,line,pie etc) on your sql-ledger data. The sample graph shows your sales per month in bar graph.

1. Installation

1. Install Perl module GD::Graph through cpan.

2. Download graphs.perl, rename to graphs.pl and copy to ./sql-ledger/bin/mozilla/ folder.

3. Create a gateway script in ./sql-ledger/ folder by copying any existing gateway script. For example:

$ cp gl.pl graphs.pl

4. Create or edit your custom_menu.ini and add the following lines:

[Custom Reports]

[Custom Reports--Sales Graph]
module=graphs.pl
action=sales_search

5. Optionally run 'perl locale.pl' in your language folder if you are not using the default English language.

You are done.

2. Some Details

graphs.pl consists of two procedures, 'sales_search' and 'sales_graph'.

sales_search displays a basic criteria form. Here you can specify the customer name to show sales by a particular customer as well as specify date range (if you have more than one year data in your dataset). Click the Continue button and sales_graph will display the actual graph.

3. More Graphs

To create more reports, just copy these two procedures (sales_search, sales_graph) within the same .pl file and rename them accordingly. Put your SQL statement and make other changes. A new graph should be ready within 5-15 minutes.

 
graphs.txt · Last modified: 2010/05/06 12:05 (external edit)
 
Except where otherwise noted, content on this wiki is licensed under the following license:CC Attribution-Noncommercial-Share Alike 3.0 Unported
Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki