I have a main report with multiple external subreports. Both the main report and the subreports receives a parameter as input. I am using it to export the report to pdf, but for some values (the same values) of the input parameter, I get the following error "Object reference not set to an instance of an object." at the line "mainReport.Render(true);".
If I try to export the subreports for those values, the report is exported successfully.
The full error is below. Any feedback is helpful.
Thanks,
Adina
Code: Select all
[NullReferenceException: Object reference not set to an instance of an object.]
Stimulsoft.Report.Components.StiContainer.Break(StiComponent dividedComponent, Double devideFactor, Double& divideLine) +729
Stimulsoft.Report.Components.StiComponentDivider.BreakContainer(Double maxAllowedHeight, StiContainer renderedContainer) +1179
Stimulsoft.Report.Engine.StiBreakableHelper.Break(StiContainer originalContainer) +41
Stimulsoft.Report.Engine.StiBreakableHelper.ProcessBreakable(StiContainer container) +106
Stimulsoft.Report.Engine.StiEngine.InternalRenderContainer(StiContainer container, Boolean isPrintAtBottom, Boolean isFooterOnAllPages) +352
Stimulsoft.Report.Engine.StiEngine.InternalRenderBand(StiBand band, Boolean ignorePageBreaks, Boolean allowRenderingEvents, Boolean& isChildsEnabled) +1437
Stimulsoft.Report.Engine.StiEngine.RenderBand(StiBand band, Boolean ignorePageBreaks, Boolean allowRenderingEvents) +602
Stimulsoft.Report.Engine.StiDataBandV2Builder.RenderBand(StiDataBand masterDataBand, StiBand band, Boolean ignorePageBreaks, Boolean allowRenderingEvents) +209
Stimulsoft.Report.Engine.StiDataBandV2Builder.RenderMaster(StiDataBand masterDataBand) +1177
Stimulsoft.Report.Engine.StiPageHelper.RenderPage(StiPage page) +2291
Stimulsoft.Report.Engine.StiRenderProviderV2.RenderReport(StiReport report, StiReport masterReport, StiRenderState state) +2514
Stimulsoft.Report.Engine.StiRenderProviderV2.Render(StiReport report, StiRenderState state) +6233
Stimulsoft.Report.Engine.StiReportV2Builder.RenderSingleReport(StiReport masterReport, StiRenderState renderState) +1457
Stimulsoft.Report.StiReport.RenderReport(StiRenderState renderState) +2263
Stimulsoft.Report.StiReport.Render(StiRenderState renderState, StiGuiMode guiMode) +1056
ProtrackMonthlyReport.Utils.ReportHelper.ExportReportAsPdf(String reportTemplate, String reportPdf, String appDirectory, DateTime reportDate) in D:\Work\MonthlyReport\Utils\ReportHelper.cs:41
ProtrackMonthlyReport.frmPreviewReport.GenerateReport(Int32 year, Int32 month, Boolean regenerateDrp) in D:\Work\MonthlyReport\frmPreviewReport.aspx.cs:40
ProtrackMonthlyReport.frmPreviewReport.GetReportByID(Int32 month) in D:\Work\Protrack\MonthlyReport\frmPreviewReport.aspx.cs:70
ProtrackMonthlyReport.frmPreviewReport.Page_Load(Object sender, EventArgs e) in D:\Work\MonthlyReport\frmPreviewReport.aspx.cs:20
System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +25
System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +42
System.Web.UI.Control.OnLoad(EventArgs e) +132
System.Web.UI.Control.LoadRecursive() +66
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2428