I'd like to run an additional api when I click the export button on Flex Monster. Before exporting Excel(/pdf, .. and so on) file, I'd like to run authority check logic on our system.
Is there a way? (For your information, I'm implementing custom api.)
Hello!
Thank you for your question.
Kindly note that it is possible to customize any Toolbar tab and include additional functionality before exporting.
We have prepared a JSFiddle example with PDF export for reference: https://jsfiddle.net/flexmonster/4jL1xdc9/.
You can find more details about customizing the Toolbar in our docs: https://www.flexmonster.com/doc/customizing-toolbar/.
Please let us know if the suggested approach works well for you.
Kind regards,
Solomiia
Hello, Jhshin!
Hope you are doing well.
Our team is wondering if you had some time to check the provided example with additional functionality included in the PDF export. Could you please let us know if it was helpful?
Looking forward to hearing from you.
Kind regards,
Solomiia
Hello, Jhshin!
Hope you are having a great week.
Just checking in to ask if the provided example with additional functionality included in the Flexmonster PDF export was helpful.
Looking forward to hearing your feedback.
Kind regards,
Solomiia
hi, thanks for the answer.
I have additional question.
Since our Excel contains important information, we need to encrypt the aip solution, and there should be no Excel file left in the browser.
1. Can we send the downloaded file to our backend to process the aip and let the user download it?
2. If I send it for aip processing, can I process it so that unencrypted files don't leave in the browser?
Hello, Jhshin!
Thank you for getting back to us.
1. Can we send the downloaded file to our backend to process the api and let the user download it?
We can suggest two approaches to export data from Flexmonster to the server:
destinationType: "server"
property to your export, so Flexmonster will send the data to the specified URL.plain
format, and then send it to the server using the functionality you like.You will find more exporting details in the following guide: https://www.flexmonster.com/doc/export-report/#destinationtype-excel.
Please note that with both approaches, Flexmonster will handle exporting data to the server, but you will need to send it back to the client on your own.
2. If I send it for api processing, can I process it so that unencrypted files don't leave in the browser?
Kindly note that Flexmonster doesn't store exported files in the browser.
If we understand correctly, you want only authorised users to see your data. In this case, our team suggests configuring the security for the whole Flexmonster component, so if the users see the grid and Toolbar, they are already authorized and can export the data. For this, you are welcome to use requestHeaders
property to pass the credentials to the server when connecting to the data source. If necessary, you can also add custom requestHeaders
when exporting.
Hope you will find our answer helpful.
Kind regards,
Solomiia
Hello, Jhshin!
Hope you are doing well.
Our team is wondering if you had a chance to look through our previous response about exporting data to your server in Flexmonster. Could you please let us know if you have any further questions?
Looking forward to hearing from you.
Kind regards,
Solomiia
Hello, Jhshin!
Hope everything is well.
Just checking in to ask if you have any further questions about exporting data to the server in Flexmonster.
Feel free to ask if there are any further questions.
Kind regards,
Solomiia