Flexmonster version: 2.8.3
The datasource type is ‘microsoft analysis services’ which are being proxy handled by our own server in the middle, i.e. client -> server -> cube. The problem that I am having is I cannot successfully place an authorization header to authorize requests the component is making to the server. From what I learned there are 2 ways to acomplish that:
Thank you for reaching out to us.
We would like to kindly inform you that the
customizeAPIRequest method is responsible for the customization of requests when the custom data source API is used and should not be used if the data source is Microsoft Analysis Services.
As for doubling of the request header, we have reproduced the issue on our side. Such a behavior is not expected and will be fixed with the nearest minor update ETA Apr 06. We will keep you posted with any updates on this point.
However, our team would like to kindly inform you that there is a better approach for the authorization with SSAS XMLA connection. It is due to the fact that starting with version 2.8.3 the
withCredentials property is added. It allows passing built-in authorization headers in case the user is logged in using the Basic/Windows authorization.
In order to allow using such authorization headers, the value of the mentioned property should be set to true.
More information about the
dataSource object and its properties (including
withCredentials) in our documentation.
We hope it helps.
Please contact us in case of additional questions.
Ah I see, thank you for the fast response.
We are glad to announce that for SSAS XMLA connection the issue with duplicating `requstHeaders` for the first request was fixed.
This is included in the 2.8.4 version of Flexmonster: https://www.flexmonster.com/release-notes/
You are welcome to update the component.
Here is our updating to the latest version guide for assistance: https://www.flexmonster.com/doc/updating-to-the-latest-version/
Please let us know if everything works.
So I updated to new version and the request headers now work. This is all well and good now for reports that I pass to the component from my code. I am having now difficulties when a user loads their own report through the toolbar. In this case I would like to attach some request headers on their loaded report before it starts to load. I tried many events to get to where I want to be, only to find that I can’t get the report object, since flexmonster.getReport() returns a null until the data is loaded (as far as I understand). I tried getting calling it from the pivotInstance.getReport(), but I think this may be the same. So my question is, is there any way to modify the loaded report before it starts loading?
Thank you for your question.
Our team would like to kindly inform you that the
report object can not be accessed before it is fully loaded on the page. Therefore, we would like to kindly recommend the following workaround:
report object using the
We have prepared an example demonstrating the described approach for opening the locally saved report. You are welcome to check it out by the link: https://jsfiddle.net/flexmonster/8mevyjsr/.
In case the report needs to be loaded from the remote file, Ajax call can be used in order to load the file on the page. Next, the data can be parsed to JSON and modified in the same way as described above.
In case the original “Open” tab of the Toolbar needs to be replaced with newly created controls, we recommend checking out our tutorial dedicated to the Toolbar customization: https://www.flexmonster.com/doc/customizing-toolbar/.
Finally, our team would like to kindly draw your attention to the
withCredentials property, which allows passing built-in authorization headers in case the user is logged in using the Basic/Windows authorization. The advantage of such an approach is that such property will be saved in the report and included in the object returned by the
We hope it helps.
Do not hesitate to contact us in case additional questions occur.