Custom Reports Module is an Add On Module for SambaPOS. You can install it through SambaMarket.
That might be a little early release because I have still plans to improve that but instead of improving it by myself I’ve decided to release it and improve it according to your needs.
What Custom Report Module basically does is displaying reports prepared with SQL.
First of all I’ll give some basic information to let you understand how you can structure your reports.
This is how that module appears when you first install it.
Click Add Report
to create new report.
Add this template inside report
Custom Report 1
[Table 1:1,1]
>Sub Row 1|
Cell 1|Cell 2
Cell 3|Cell 4
Clicking OK should display…
This is what each template line displays.
Formatting Tables
When we add a Table Tag
all lines added under that table tag will appear as a table row.
The Syntax for Table Tag is
[Table Name:Columns]
While defining columns you also define columns sizes. If you need two columns with same size you’ll add 1,1.
[Table Name:1,1]
We’re defining column sizes as percents. Percent = Total number of sizes / Column Size. So it will creates two columns with %50 size.
Examples:
[Table Name:2,1]: it will create two columns and
3/2 (%66)
for first column and3/1 (%33)
for second column.
[Table Name:2,1,2]: it will create three columns and
5/2 (%40)
for first,5/1 (%20)
and5/2 (%40)
for third column.
###Formatting Rows
Row values are delimited with |
(pipe) char. The number of pipes for each row should match table’s column count -1 .
[Table 1:1,1] >>>> Creates Two Columns
Cell 1|Cell 2 >>>> Has Two values separated with | char.
###Spanning Rows
Empty Values will Span. Cell counts should match with column count
Example 1
[Table 1:1,1]
Cell 1|Cell 2
Cell 3| >>>> This row will appear as a single cell
Cell 4|Cell 5
Example 2
[Table 1:1,1,1] >>>> Three Columns
Cell 1|Cell 2|Cell 3
Cell 3||Cell 4 >>>> Two Pipes used to match columns
Cell 5|Cell 6|Cell 7
###Bold Rows
Adding >
char before a row will display it as a highlighted bold row. Useful for splitting reports to sections or displaying totals.
###Multiple Tables
A custom report may contain multiple tables.
[Table 1:1,1]
Value 1|Value2
[Table 2:1,1]
Value 3|Value4
###Column Alignments
By default all columns are left aligned. If you add a space before column size value it will align to right.
[Table 1:1, 1] >> Second 1 starts with a space char
Value 1|Value2 So Value2 column will align to right.