作成日: 2025/02/06 最終更新日: 2025/11/12
文書種別
不具合
状況
修正済み
詳細
セクションレポートのイベント処理でSubReportのReportプロパティにnullを設定すると、以下の例外が発生します。
System.NullReferenceException
HResult=0x80004003
Message=オブジェクト参照がオブジェクト インスタンスに設定されていません。
Source=MESCIUS.ActiveReports
スタック トレース:
at GrapeCity.ActiveReports.SectionReportModel.Section.RestartSubReports(SectionReport report)
回避方法
SP2 (18.2.0.0) で修正済み
※以前の回避方法
nullを設定せず、Visibleプロパティで非表示にしてください。
if (判定条件)
{
subReport1.Report = report2;
subReport1.Visible = true;
}
else
{
//subReport1.Report = null;
subReport1.Visible = false;
}