私はSSRSレポートを持っています。オプション(再コンパイル)でSPを使用しているSSRSは、asp.netに埋め込まれたレポートをロードするために永遠に服用していますReportViewer
SSRSブラウザーページhttp://localhost/reportserverを使用してレポートを開くと、レポートは正常に動作し、データが読み込まれます。データはわずか4行です。
しかし、レポートビューアにレポートを埋め込むと、表示される進行状況だけがロードされることはありません。
私はoption(recompile)
を追加しましたが、まだ結果はありません。続き
には、以下の私のSP
BEGIN
-- SET NOCOUNT ON added to prevent extra result sets from
-- interfering with SELECT statements.
SET NOCOUNT ON;
select s.Name,s.Id as STUDENT_ID,a.AttendanceStatus,a.AttendanceDate,
case when (select count(*) from
Attendance where AttendanceStatus='Present')>
(select count(*) from Attendance where
AttendanceStatus='Absent') then 'Regular' else 'Not Regular' end as IsRegular
from Student s
inner join Attendance a on s.Id=a.Student_ID
where [email protected]_Id
option(recompile)
END
が、私はその背後にある任意のロジックを知らない私は、レポートビューアー
ReportViewer1.ServerReport.ReportServerUrl = new System.Uri("http://localhost/ReportServer");
ReportViewer1.ServerReport.ReportPath = "/Report1";
ReportViewer1.ProcessingMode = ProcessingMode.Remote;
Microsoft.Reporting.WebForms.ReportParameter[] Param = new Microsoft.Reporting.WebForms.ReportParameter[1];
Param[0] = new Microsoft.Reporting.WebForms.ReportParameter("Student_Id","1");
ReportViewer1.ShowParameterPrompts = false;
ReportViewer1.ServerReport.SetParameters(Param);
他の詳細(実行計画とインデックス情報)がない場合は、パラメータスニッフィングの修正を試してください。あなたは '@ Student_Id_loc'を宣言してそれを' @Support_Id'で代入し、あなたのクエリで '@Support_Id_loc'を使用できますか? 'オプション(再コンパイル)' –
を削除して、レポートサーバの 'executionlog3'テーブルを調べ、どこに時間がかかるかを確認することもできます。あなたは 'TimeDataRetrieval'、' TimeProcessing'と 'TimeRendering'カラムを持っています。 –
これらのタイミングは、アプリケーションのReportViewerからレポートを実行するタイミングです。はいの場合は、正常に実行されたレポートのように見えます。あなたのアプリケーション内のいくつかの他の問題かもしれません。 –