Class

BalancesDataTableBuilder

BalancesDataTableBuilder()

A BalancesDataTableBuilder is used to setup and build two-dimensional arrays containing balance information.

Constructor

new BalancesDataTableBuilder()

Methods

build()

Gets an two-dimensional array with the balances.
For BalanceType.TOTAL, the table format looks like:
    _____________________
   |    NAME   | AMOUNT  |
   | Expenses  | 4568.23 |
   | Incomes   | 5678.93 |
   |    ...    |   ...   |
   |___________|_________|

   
Two columns, and Each Group|Account|Tag per line.

For BalanceType.PERIOD, BalanceType.CUMULATIVE, the table will be a time table, and the format looks like:
    _____________________________________________
   |    DATE    | Expenses | Incomes |    ...   |
   | 15/01/2014 | 2345.23  | 3452.93 |    ...   |
   | 15/02/2014 | 2345.93  | 3456.46 |    ...   |
   | 15/03/2014 | 2456.45  | 3567.87 |    ...   |
   |    ...     |   ...    |   ...   |    ...   |
   |___________ |__________|_________|__________|

  
First column will be the Date column, and one column for each Group|Account|Tag.
Array[][]

buildChartDataTable()

Builds a Chart Services data table
The internal structure is the same of build
DataTable a Chart Services DataTable

formatDate()

Defines whether the dates should be formatted based on date pattern of book and periodicity.
BalancesDataTableBuilder the builder with respective formatting option.

formatValue()

Defines whether the value should be formatted based on decimal separator of book.
BalancesDataTableBuilder the builder with respective formatting option.

setBalanceType(balanceType)

Sets the BalanceType.
Parameters:
Name Type Description
balanceType BalanceType
BalancesDataTableBuilder the builder with respective balance type.