ReportViewer - Hide PDF Export

前端 未结 18 1524
暖寄归人
暖寄归人 2020-12-13 10:40

I make use of a ReportView component in a VB.Net 2005 app. How can I disable the PDF export functionality, only keeping the MS Excel format?

18条回答
  •  有刺的猬
    2020-12-13 10:59

    For ReportViewer >2010 i use this aproach made with jQuery

    function HideExtension(ext) {
            var $reportViewer = $("[id*=ReportViewer1]");
            var $botons = $reportViewer.find("a");
            $botons.each(function (index,element) {
                if($(element).html()==ext)
                {
                    $(element).parent().css("display", "none");
                }
            });
        }
    

    Just change the selector for your own and call the function from $(document).ready(function(){//here})

提交回复
热议问题