Skip to content

Instantly share code, notes, and snippets.

@floverfelt
Created February 14, 2021 01:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save floverfelt/f104649c866637c09742818aed6f29aa to your computer and use it in GitHub Desktop.
Save floverfelt/f104649c866637c09742818aed6f29aa to your computer and use it in GitHub Desktop.
Report as json
WebReportSource reportSource = adminSession.getFactory().getReportSource();
WebReportExecutionSettings webReportExecutionSettings = reportSource.newExecutionSettings();
webReportExecutionSettings.setSource("your-cube-id",
EnumWebReportSourceType.WebReportSourceTypeCube);
WebReportInstance webReportInstance = reportSource.getNewInstance(webReportExecutionSettings);
webReportInstance.setExecutionMode(EnumWebReportExecutionModes.REPORT_MODE_PLAIN_TEXT);
webReportInstance.getExportSettings().setMode(EnumDSSXMLExportFormat.DssXmlExportJSON);
webReportInstance.setAsync(false);
webReportInstance.pollStatus();
System.out.println(webReportInstance.getResultsAsJSON());
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment