Skip to content
A table component for Pentaho Ctools with buttons for copy, Print, CSV, Excel, PDf and ColVis
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
Buttons
ColReorder
DataTables
JSZip
i18n
images
pdfmake/build
sample
README.md
TableWithButtonsComponent.js
component.xml

README.md

TableWithButtons

A table component for Pentaho Ctools with buttons for Copy, Print, CSV, Excel, PDF and ColVis

WARNING

This component comes we no warranty. I won't assume any damage caused by its use!

Description

This is a rework of https://github.com/fernandommota/table-bootstrap-component (Many thanks to Fernando Maia da Mota) based on the Buttons extension of dataTables (http://datatables.net/extensions/buttons/) I have tested it with Pentaho BA CE 5.4

Caveat

The Buttons extension needs a more recent version of DataTables that the one used by Pentaho CDE : The component includes DataTables 1.10.10 ; as far as I know, there is no conflict, but I didn't make comprehensive tests

In order to have nice pdf, Buttons uses pdfmake.js (http://pdfmake.org/#/), but the current version (0.1.20) is conflicting with CDE (see : https://github.com/bpampuch/pdfmake/pull/443), so I have used the version of this pullrequest although it is not commited. Here again, I didn't make comprehensive tests

Usage

Installation

  • Download and extract the zip file on this path:

biserver-ce/pentaho-solutions/system/pentaho-cdf-dd/resources/custom/components/

  • Restart your server

Properties

  • oLanguage : enter here your language (e.g. French) : if there is a French.json file in the subdirectory i18n, it will be used : The file commes from dataTables with addition of keys for the Buttons

  • Buttons definition : define the buttons. This is an array. The first column is the name of the button (pdf, colvis,...). The second one is a function describing the button : For example :

    function(){
      var btn={
      title : 'My report',
      orientation: 'landscape',
      pageSize : 'A5'
      }
      return btn;
    }
    
  • ColReorder : allows to reorder the columns (default : False)

  • sDom : by default,'Bfrtip' (see Datatables for the syntax)

See the sample dashboard in the sample directory

The remaining is like Table Component

TODO

  • Hide oLanguage and add a property Language and, if empty, infer the language from the 'locale' (e.g : fr_FR, fr_CA,...)
You can’t perform that action at this time.