Object reference not set to an instance of an object.
Posted: Sun Oct 23, 2011 7:42 am
Hi,
I'm using Stimulsoft Reports.Ultimate 2010.1 . when i try to show report in design mode in my prgrom this exception happens:
Exception: System.NullRefrenceException
Source: Stimulsoft.Base
Stack trace:
at Stimulsoft.Base.StiActivator.CreateObject(String typeName, Object[] arguments)
at Stimulsoft.Base.StiActivator.CreateObject(Type type, Object[] arguments)
at Stimulsoft.Report.StiReport.PrepareForDesign()
at Stimulsoft.Report.StiReport.StartDesigner(StiReport report, Form parentForm, Boolean dialogForm, IWin32Window win32Window)
at Stimulsoft.Report.StiReport.Design(Form parentForm, Boolean dialogForm, IWin32Window win32Window)
at Stimulsoft.Report.StiReport.Design(Boolean dialogForm)
at Stimulsoft.Report.StiReport.Design()
and this is my code:
StiReport report = new StiReport();
report.DataSources.Add(dataSource);
Stimulsoft.Report.Design.Wizards.StiStandardWizardService stiNewReport =
new Stimulsoft.Report.Design.Wizards.StiStandardWizardService();
report = stiNewReport.CreateReport(report);
if (report != null)
{
if (report.DataSources.Count == 0)
{
report.DataSources.Add(dataSource);
}
report.Design( ); //exception in here happens.
}
please help me.
I'm using Stimulsoft Reports.Ultimate 2010.1 . when i try to show report in design mode in my prgrom this exception happens:
Exception: System.NullRefrenceException
Source: Stimulsoft.Base
Stack trace:
at Stimulsoft.Base.StiActivator.CreateObject(String typeName, Object[] arguments)
at Stimulsoft.Base.StiActivator.CreateObject(Type type, Object[] arguments)
at Stimulsoft.Report.StiReport.PrepareForDesign()
at Stimulsoft.Report.StiReport.StartDesigner(StiReport report, Form parentForm, Boolean dialogForm, IWin32Window win32Window)
at Stimulsoft.Report.StiReport.Design(Form parentForm, Boolean dialogForm, IWin32Window win32Window)
at Stimulsoft.Report.StiReport.Design(Boolean dialogForm)
at Stimulsoft.Report.StiReport.Design()
and this is my code:
StiReport report = new StiReport();
report.DataSources.Add(dataSource);
Stimulsoft.Report.Design.Wizards.StiStandardWizardService stiNewReport =
new Stimulsoft.Report.Design.Wizards.StiStandardWizardService();
report = stiNewReport.CreateReport(report);
if (report != null)
{
if (report.DataSources.Count == 0)
{
report.DataSources.Add(dataSource);
}
report.Design( ); //exception in here happens.
}
please help me.