Forum Discussion
2 Replies
- db_pdxValued Contributor
Hi fc: if you are already planning to have a dashboard that the end user accesses, you can display the data in a generic grid view component. Users can then Right-Click > Export > To CSV. We put this directly in the import workflow as part of the Validate step. No Business Rules required.
You can also create full 'dashboard button to csv' exports. Our flow is spread across a few BR components (as they are generalized/parameterized), but I would expect it could be all within one Dashboard Extender. Some of the key components include:
- BRApi.Dashboards.Process.GetAdoDataSetForAdapter(...) - for executing the data adapter that queries the dbo.vStageSourceAndTarget
- A function/sub for converting from a DataTable to a CSV - we found one from the net. There might be more formal solutions for this now.
- BRApi.Utilities.SaveFileBytesToUserTempFolder(...) - which saves the output to a temp folder and pops it up on screen for the users like they'd expect with an extract.
- fcContributor
Hi db_pdx
unfortunately the query I need is not a direct extraction but it includes a calculation and data elaboration, reason why your first solution doesn't work for my case.
I tried however with your second solution, and I actually managed to export a csv in the file share. However, the export works fine if the number of rows is limited, when the complexity and heaviness of the query increase the client struggles and I need to force close it and open it again to keep working. It seems to be a performance issue more than anything else.
Let me know if you have any alternative to this approach, but in any case thank you for the help!
Related Content
- 1 year ago