NullReferenceException on report.Render()

Stimulsoft Reports.Silverlight discussion
Locked
alanj
Posts: 2
Joined: Wed Dec 07, 2011 11:44 am
Location: Ireland

NullReferenceException on report.Render()

Post 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
Alex K.
Posts: 6488
Joined: Thu Jul 29, 2010 2:37 am

NullReferenceException on report.Render()

Post by Alex K. »

Hello,

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

Thank you.
alanj
Posts: 2
Joined: Wed Dec 07, 2011 11:44 am
Location: Ireland

NullReferenceException on report.Render()

Post by alanj »

Hi Aleksey,

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

Thanks,

Alan
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

NullReferenceException on report.Render()

Post 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.
Locked