我想通过资源文件设置子报表标题文本。这是我在下面尝试过的代码
ReportDocument rDocument = (ReportDocument)Session["ReportSource"];
((TextObject)rDocument.Subreports["HolidaySubReport"].ReportDefinition.
ReportObjects["HolidaySchedule"]).Text=Resources.Resources.HolidaySchedule;
但在这里我收到的错误为object reference not set to instance of object
我如何解决这个问题。非常感谢。
答案 0 :(得分:0)
TextObject txtpentotal = (TextObject)objRpt.Subreports["Subreport.rpt"].ReportDefinition.Sections["Section4"].ReportObjects["txttotal"];
txtpentotal.Text = pen.Text;