Get Free Trial

How to load report data from Url while using puppeteer

loveena asked on August 31, 2021

I am using puppeteer in my flexmonster module. When i am using

dataSource: {

Report is loading fine and also image is exporting with data. But.
When i am trying to load report from URL,

“dataSource”: {
“Authorization”:”Basic TOKEN”
Then no report is loading and also image is creating empty.

Please suggest


3 answers

Illia Yatsyshyn Illia Yatsyshyn Flexmonster September 1, 2021

Thank you for posting on our forum.
We recommend making sure the specified API endpoint is reachable from the browser. Create Flexmonster instance in a sample page without using puppeteer and apply the same report to see if any errors occur. In case any alerts, warnings, or console exceptions arise, please send us corresponding screenshots.
Looking forward to hearing from you.
Kind regards,

loveena September 2, 2021

The flexmonster reports are loading fine on other pages but not in puppeteer if we use same reports.
Please suggest us some Js fiddle examples to export the data and image of flexmonster report loading from the API url while using puppeteer .

Illia Yatsyshyn Illia Yatsyshyn Flexmonster September 3, 2021

Thank you for checking the connection to your data source outside the puppeteer project.
We recommend making sure that the Slice Object is defined in your reports. It should contain rows, columns, and measures properties in order to be correctly displayed. Otherwise, Flexmonster will not show the grid with the default slice configuration. Instead, it will open the Field List allowing the user to choose fields to display. In this case, empty export files may be generated.
You can check the component’s behavior by setting the headless parameter of the launch method to false: const browser = await puppeteer.launch({ headless: false });.
Please let us know if it helps.
Kind regards,

Please login or Register to Submit Answer