Page 1 of 1

NullReferenceException on report.Render()

Posted: Wed Dec 07, 2011 12:15 pm
by alanj
Hi all,

After looking at the WCF samples provided, I have implemented the same functionality in my current project which works successfully, except for when the report contains a Form.
When the report.Render() method is called a NullReferenceException occurs : "Object reference not set to an instance of an object".

I have used this same report file in the Sample WCF project provided and it works without any problems, and have recently updated the Stimulsoft version from 2011.2 to 2011.3.


I've included the code and stacktrace for the exception below,


StiReport report = new StiReport();
report.Load("filePath");

// Set Connection String
report.Dictionary.Databases.Clear();
report.Dictionary.Databases.Add(new StiSqlDatabase("DatebaseName", "DataBaseConnectionString"));

// Render report
report.Render(false);



at Stimulsoft.Base.StiExceptionForm..ctor(Exception exception)
at Stimulsoft.Base.StiExceptionProvider.Show(Exception exception)
at Stimulsoft.Report.Dialogs.StiWinDialogsProvider.RenderForm(IStiForm formControl)
at Stimulsoft.Report.Dialogs.StiWinDialogsProvider.Render(StiReport report, StiFormStartMode startMode)
at Stimulsoft.Report.Engine.StiRenderProviderV2.RenderFormsOnStart(StiReport report)
at Stimulsoft.Report.Engine.StiRenderProviderV2.Render(StiReport report, StiRenderState state)
at Stimulsoft.Report.Engine.StiReportV2Builder.RenderSingleReport(StiReport masterReport, StiRenderState renderState)
at Stimulsoft.Report.StiReport.RenderReport(StiRenderState renderState)
at Stimulsoft.Report.StiReport.Render(StiRenderState renderState, StiGuiMode guiMode)
at Socrates.Web.Reports.ReportService.Render()


Would appreciate any help ye could give me,

Regards,

Alan

NullReferenceException on report.Render()

Posted: Thu Dec 08, 2011 1:23 am
by Alex K.
Hello,

Unfortunately, but Forms is not supported in Silverlight version and will not be

Thank you.

NullReferenceException on report.Render()

Posted: Fri Dec 09, 2011 8:38 am
by alanj
Hi Aleksey,

Thanks for the reply, I acheived what was required using variables and user parameters.

Thanks,

Alan

NullReferenceException on report.Render()

Posted: Mon Dec 12, 2011 7:39 am
by HighAley
Hello.
alanj wrote:Thanks for the reply, I acheived what was required using variables and user parameters.
Let us know if you need any additional help.

Thank you.