本文介绍了SSRS甚至钻透的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

以下是我正在使用的代码:

Below is the code I am using:

protected void ReportViewer1_Drillthrough(object sender, DrillthroughEventArgs e)
       {
           LocalReport localReport = (LocalReport)e.Report;
           localReport.DataSources.Add(new ReportDataSource("InfosourceReportsDS"));
       }



以下是reportviewer的aspx:



Below is the aspx for reportviewer:

<rsweb:ReportViewer ID="ReportViewer1" runat="server" Font-Names="Verdana" Font-Size="8pt"

            Height="800px" ProcessingMode="Remote" Width="1075px"

            ShowPrintButton="false" ExportContentDisposition="AlwaysInline"

            ondrillthrough="ReportViewer1_Drillthrough">
            <ServerReport ReportServerUrl="" />
            <LocalReport EnableHyperlinks="True">
            </LocalReport>
</rsweb:ReportViewer>



我在以下语句的钻取事件中得到以下异常:
LocalReport localReport =(LocalReport)e.Report;

例外:
将Microsoft.Reporting.WebForms.ServerReport强制转换为''Microsoft.Reporting.WebForms.LocalReport''



I am getting the below exception in the Drillthrough event at the below statement:
LocalReport localReport = (LocalReport)e.Report;

Exception:
cast Microsoft.Reporting.WebForms.ServerReport'' to type ''Microsoft.Reporting.WebForms.LocalReport''

推荐答案


这篇关于SSRS甚至钻透的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-13 21:04