Export report from ReportViewer to CSV

8

In ReportViewer using Winforms , when I create the report I only have the option to export to PDF, Excel and Word and I need to add the export option in CSV.

    
asked by anonymous 26.11.2014 / 11:32

1 answer

0
private void reportViewer_Load(object sender, EventArgs e) { var fieldInfo = typeof(Microsoft.Reporting.WinForms.RenderingExtension).GetField("m_isVisible", System.Reflection.BindingFlags.Instance | System.Reflection.BindingFlags.NonPublic);

foreach (var extension in this.reportViewer.LocalReport.ListRenderingExtensions())
{
    if (string.Compare("EXCELOPENXML", extension.Name) == 0)
        fieldInfo.SetValue(extension, true);
}}
    
19.09.2018 / 18:27