javascriptjquerypentahodashboardpentaho-cde

Pentaho CDE Dashbord: how to export to excel multiple tables into one sheet with button click


I have a CDE dashboard with multiple tables using the same column names: enter image description here

I need to export to excel all the tables together into one excel sheet. I am using this on my button:

function exportTableData()
{

render_tblRosterTotals.queryState.exportData('xls', null,  {filename:'Roster_totals.xls'});

render_tblClassTotals.queryState.exportData('xls', null,  {filename:'Class_Totals.xls'});

 

} 

which exports each table as a separate file but need them to both be combined into a single file on a single sheet.


Solution

  • I ended up creating a separate datasource that combined all the tables data into one query and then used that as the source for the button to export from.