Exporting underlying data to CSV

2 posts, 0 answers
  1. Paul
    Paul avatar
    2 posts
    Member since:
    May 2015

    Posted 12 Apr 2018 Link to this post

    Hi,

    I am trying to export the reporting dataset to CSV. The built-in export to CSV function does not fit my needs as my use case is for a CSV export of all data used to plot the line-graph that the user is currently looking at. In order to do this, I have created a function on the report which outputs the datasources and I then extract the SQL query, add the user selected parameters and then re-execute the statement against the DB.

     

    I have several questions about this -

    1. This feels like a huge overhead given that the dataset has already been pulled from the database but I cannot find any way to access the datatable used by the report. Can I access the reports datatable?
    2. I am using the HTML5 report viewer and cannot find any way to access the InstanceReportSource, this means I can't access the parameters sent to the report and I need to get the parameters from the ReportViewer instead. This is problematic as the parameters aren't loaded until after the user clicks Preview; our reports automatically load and 50% of the time this will be the CSV data that the user wants. As a work around I have added a function that will return the default values used upon the reports first run but again, thIs feels like a huge overhead and gives us maintainability issues etc. Is there a way to access the InstanceReportSource so I can get the parameters used by the report?
    3. I am open to suggestions that will make this easier/more maintainable, is there a better way to solve this problem? 

    Thanks

  2. Paul
    Paul avatar
    2 posts
    Member since:
    May 2015

    Posted 19 Apr 2018 in reply to Paul Link to this post

    I've read countless pages of documentation and forum threads and I can't find a solution to this. 

    Can anyone help me? If I've been unclear or if more information is required then please let me know.

Back to Top