Hello,
Thank you for your question.
The Toolbar can be customized to add/remove/change the Toolbar’s Tabs.
Here is a JSFiddle example showing how the “Open”
Tab can be customized to contain a custom option ("Sales Report"
) for loading a remote report: https://jsfiddle.net/flexmonster/xvs7cbLw/.
In the example, the load() API call is used for loading the remote report.
Please let us know if this is what you are looking for.
Looking forward to your reply.
Kind regards,
Vera
Hi,
The option you provided is also good but my question is when I click open > remote report it shows a pop-up with this https://cdn.flexmonster.com/reports/report.json default URL how can I customize it to a custom data source URL.
Hello,
Thank you for providing the details.
To change the Open Remote Report pop-up's prefilled link, we suggest overwriting the corresponding function of the Toolbar.
The function is named showOpenRemoteReportDialog
. It can be accessed both from the page where Flexmonster is created or directly from the flexmonster.toolbar.js
file.
We recommend using the first approach because it allows to preserve changes after updating the component.
To access the Toolbar, we recommend using the beforetoolbarcreated event. The toolbar
object will be passed to the handler of the beforetoolbarcreated
event. Use this object to access the showOpenRemoteReportDialog
and overwrite the link:
flexmonster.on("beforetoolbarcreated", (toolbar) => {
toolbar.showOpenRemoteReportDialog = function() {
...
}
});
We suggest checking out the sample we have prepared to demonstrate this approach.
Please let us know if it works for you.
Our team is looking forward to your feedback.
Best regards,
Illia