SpagoBI - Table | ||
![]() |
||
Parameters | Description | Default |
paramWidth | Set the table width | 300 |
paramHeight | Set the table height | 180 |
xColName | Name of the label that identifies a special column from the dataset. This will be the first column on the left and it will be possible to assign it a different background color. | xLabel |
refreshRate | Set the delay between two consecutive data requests to server | 15000 |
rowsNumber | Set the number of visible rows on the table | 5 |
rowsSpacing | Set the space between two rows | 0 |
headerHeight | Select the percentage of table for header | 20 |
dataurl | Specify the URL of the servlet that returns data | http://localhost:8080/openlaszlo/OpenLaszloEngineDash |
xColHeadBGcolor | Set the background color for the header of the column identified by xColName. If -1, this cell will be transparent | 0x140f7e |
colHeadBGcolor | Set the background color for the header of all the columns but the one identified by xColName. If -1, these cells will be transparent | 0x140f7e |
headBGColor | Set the background color for header. This will be visible if colHeader or xColHeader are -1 | 0xffffff |
xColBGColor | Set the background color for the cells of the column identified by xColName. If -1, this cell will be transparent | 0xf2f4c5 |
colBGColor | Set the background color for the cells of all the columns but the one identified by xColName. If -1, these cells will be transparent | -1 |
BGColor | Set the background color for cells. This will be visible if colBGColor or xColBGColor are -1 | 0xffffff |
gradOpacityBck | Set the opacity parameter for background gradients | 0.5 |
gradOpacityCell | Set the opacity parameter for cells gradients | 0.3 |
vertScrollBar | Set the vertical ScrollBar visible if required | true |
horizScrollBar | Set the horizontal ScrollBar visible if required | true |
fontSizeCell | Set the fontsize for cells | 12 |
fontSizeHeader | Set the fontsize for headers | 12 |
How to feed this movie | |
---|---|
Using a script |
The script must return a String like: "<rows><row {xColName parameter}='{literal value}' {cell 1 label}='{numeric value}' {cell 2 label}='{numeric value}' ... /></rows>". Script example (assuming that the xColName parameter is "Store"): StringBuffer buf = new StringBuffer(); buf.append('<rows>'); buf.append('<row Store=\'Store1\' Sales=\' '); float perm1 = ... [numeric value calculation] buf.append(perm1); buf.append('\' />'); buf.append('<row Store=\'Store2\' Sales=\' '); float perm2 = ... [numeric value calculation] buf.append(perm2); buf.append('\' />'); buf.append('<row Store=\'Store3\' Sales=\' '); float perm3 = ... [numeric value calculation] buf.append(perm3); buf.append('\' />'); buf.append('</rows>'); return buf; |
Using a query |
The query can return many rows. Each row must have an attribute with the key represented by the xColName parameter and with a literal value (this will be the label of the table row dataset and it will appear in the first column) and other attributes: for each row attribute, the key is considered as the column label, the value (that must be a numeric value) is considered as the current cell value: select {something representing the row dataset} as {xColName parameter}, {something 1}, {something 2} ... from {table} .... Query example (assuming that the xColName parameter is "Store"): select store_name as Store, store_sales as Sales from stores where Store in ('Store1','Store2','Store3') |