I'm trying to view a report in StiWebViewerSL, and I have no errors in debug time, but at run time this happens:
Exception occurred during the execution (yellow page)
[NullReferenceException: Object reference not set to an instance of an object.]
Stimulsoft.Base.StiExceptionForm..ctor(Exception exception) +754
Stimulsoft.Base.StiExceptionProvider.Show(Exception exception) +116
Stimulsoft.Report.Dialogs.StiWinDialogsProvider.RenderForm(IStiForm formControl) +402
Stimulsoft.Report.Dialogs.StiWinDialogsProvider.Render(StiReport report, StiFormStartMode startMode) +245
Stimulsoft.Report.Engine.StiRenderProviderV2.RenderFormsOnStart(StiReport report) +128
Stimulsoft.Report.Engine.StiRenderProviderV2.Render(StiReport report, StiRenderState state) +5907
Stimulsoft.Report.Engine.StiReportV2Builder.RenderSingleReport(StiReport masterReport, StiRenderState renderState) +1227
Stimulsoft.Report.StiReport.RenderReport(StiRenderState renderState) +2037
Stimulsoft.Report.StiReport.Render(StiRenderState renderState, StiGuiMode guiMode) +943
Stimulsoft.Report.WebSL.StiWebViewerSL.set_Report(StiReport value) +280
I think it has something to do with loading assemblies that RenderForm method is depended on. any idea?
thanks in advanced.
aspx code:
Code: Select all
<body>
<form id="Reportform" runat="server">
<cc1:StiWebViewerSL ID="stiViewer" runat="server" Width="100%" Height="700" AutoMaximize="true" />
</form>
</body>
Code: Select all
//do some business stuff
// instance which creates Stimulsoft report document
var marshal = ReportMarshal.CreateInstance("BusinessLayer.FGReportMarshal");
//generates Stimulsoft report and registers data
var requestID = marshal.RequestReportView(businessreport, authenticationInfo, dataLimitation, dataFilters);
var reportFile = marshal.GetReport(requestID);
stiViewer.Report = reportFile.ReportFileDocument as StiReport;