0

VS2012 までに、レポート Web サービスに接続し、LocalReport ではなく ServerReport であるレポートに「handShake」パラメータをロードする必要があります。

これは私の Page_Init コードです:

    If (Request.QueryString("handShake") = Nothing) Then
        Response.Redirect("~/AccessDenial.aspx")
    End If

    '' Set up the credentials
    ReportViewer1.ServerReport.ReportServerUrl = New Uri(ConfigurationManager.AppSettings("MyReportServerPath"))
    ReportViewer1.ServerReport.ReportServerCredentials = New MyReportServerCredentials()

    Dim objparameter As Microsoft.Reporting.WebForms.ReportParameter

    objparameter = New Microsoft.Reporting.WebForms.ReportParameter("handShake", Request.QueryString("handShake").ToString)

    ReportViewer1.ServerReport.SetParameters(objparameter)

コードの最後の行で Error が表示されます:

         The source of the report definition has not been specified." 

多くのフォーラムでは、serverReport を localReport に変更する必要があると言われていますが、そうではありません...

助けてくれてありがとう!

4

1 に答える 1

3

に加えて

.ServerReport.ReportServerUrl

.ServerReport.ReportServerCredentials

あなたも指定する必要があります

.ServerReport.ReportPath

SSRSの実際のレポートを指します。これは、パラメータを設定するレポート定義 (通常はアップロードされた RDL) です。例えば

ReportViewer1.ServerReport.ReportPath = "/My Reports/Summary Report"
于 2013-08-13T14:53:29.080 に答える