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