locked
ReportViewer ver 14 (RDLC) not showing export button RRS feed

  • Question

  • User-1716951449 posted

    the export button is not showing, even a proper rpt is generated.

    it only show the report page navigation, and refresh buttons.

    i have tried to increase the report viewer size, assuming it need bigger width to show that buttons, but it's not working.

    at rare times, dunno how, it will show that button.

    Thursday, November 2, 2017 9:55 AM

Answers

  • User-1716951449 posted

    based on testing, it is due to the client side viewer width/size

    small window will not able to get that export button

    for testing, i set it to something like 600/800 width, only it shows up

    anyway, now i'm trying to do server rendering, once it done, i don't need the viewer at client side.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Tuesday, November 7, 2017 3:38 AM

All replies

  • User347430248 posted

    Hi Kelmen,

    I want to confirm with you that is the export button not displaying completely or there are no options in export button?

    check that your report is using any code like below or not. which is used to disable the export options in export button.

    protected void ReportViewer_OnLoad(object sender, EventArgs e)
    {
        //string exportOption = "Excel";
        //string exportOption = "Word";
        string exportOption = "PDF";
        RenderingExtension extension = ReportViewer1.LocalReport.ListRenderingExtensions().ToList().Find(x => x.Name.Equals(exportOption, StringComparison.CurrentCultureIgnoreCase));
        if (extension != null)
        {
            System.Reflection.FieldInfo fieldInfo = extension.GetType().GetField("m_isVisible", System.Reflection.BindingFlags.Instance | System.Reflection.BindingFlags.NonPublic);
            fieldInfo.SetValue(extension, false);
        }
    }

    if it is using the code like this then try to modify the code to solve the issue.

    Reference:

    ASP.Net RDLC (Local SSRS) Report Viewer: Hide (Disable) specific export option (Word / Excel / PDF) from Export button

    How to disable (hide) specific Export Button from RDLC ReportViewer in ASP.Net 

    also check that you had added the export controls like below.

                ReportViewer1.ShowExportControls = true;
    

    if not then you can try to add it and then make a test.

    Reference:

    LocalReport(rdlc) in asp .net

    Regards

    Deepak
                                                               

    Monday, November 6, 2017 8:16 AM
  • User-1716951449 posted

    based on testing, it is due to the client side viewer width/size

    small window will not able to get that export button

    for testing, i set it to something like 600/800 width, only it shows up

    anyway, now i'm trying to do server rendering, once it done, i don't need the viewer at client side.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Tuesday, November 7, 2017 3:38 AM