Search code examples
javascriptexport-to-excelpentaho-cde

Using Pentaho CDE check component data as file name for export


I am trying to use some check component selections as part of an export file name.

function exportTableData() {
  var cd = this.dashboard.getParameterValue("paramCOUNTIES");
  render_tblLSI_COUNT.queryState.exportData('xls', null,  {filename:'CS Annual Data '+cd+' '+ '.xls'});

}

However when I select one check item the export works fine but if I select more then one the export does not work. Due to permissions I cannot view the error code so I'm not sure what the cause is. Has anyone else had this issue or have an idea on how I can get all the values checked to work?

I am wondering if the issue is that I am not decoding the check component array data first? any suggestions would be appreciated.

Thanks


Solution

  • Best way would be to add a breakpoint on that code and seeing what you're passing to the exportData function. If that parameter is a set by a multi select component it'll be an array, so you're running into trouble by just treating it as a string. Maybe you'll want to join that array using a sensible separator?