Sometime I get Object Reference not set to an instance of an object.H

Stimulsoft Reports.NET discussion
fkmfkm
Posts: 181
Joined: Thu Jul 05, 2007 11:26 pm
Location: Kuala Lumpur

Sometime I get Object Reference not set to an instance of an object.H

Post by fkmfkm »

Hi,

I have these codes.

....more lines above
rep("Discount") = (rep("NetAmount") * currRec.DiscountPct / 100)
rep("GrandTotal") = currRec.ForeignAmount
rep("PrintRemark") = currRec.PrintRemark

Stimulsoft.Report.Web.StiReportResponse.ResponseAsPdf(Me, rep)

Sometimes at the ResponseAsPdf line I get this error..

Stack Trace:


[NullReferenceException: Object reference not set to an instance of an object.]
Stimulsoft.Report.StiStatesManager.Pop(String stateName, Object obj, String property) +28
Reports.Report.RestoreState(String stateName) +35
Stimulsoft.Report.Components.StiDataBand.RenderComponent(StiComponent& renderedComponent, StiContainer outContainer, Boolean value) +7348
Stimulsoft.Report.Components.StiDataBand.RenderComponent(StiComponent& renderedComponent, StiContainer outContainer) +134
Stimulsoft.Report.Components.StiDataBand.Render(StiComponent& renderedComponent, StiContainer outContainer) +594
Stimulsoft.Report.Components.StiComponent.Render(StiContainer outContainer) +23
Stimulsoft.Report.Components.StiContainer.CoreRenderCont(StiComponent& renderedComponent, StiContainer outContainer) +880
Stimulsoft.Report.Components.StiContainer.RenderContainer(StiComponent& renderedComponent, StiContainer outContainer) +23
Stimulsoft.Report.Components.StiPage.RenderComponent(StiComponent& renderedComponent, StiContainer outContainer) +1243
Stimulsoft.Report.Components.StiComponent.Render(StiComponent& renderedComponent, StiContainer outContainer) +258
Stimulsoft.Report.Components.StiComponent.Render(StiContainer outContainer) +23
Stimulsoft.Report.Render.StiRender.GetNextPage() +835
Stimulsoft.Report.Render.StiRenderProvider.RenderReport(StiReport report, StiReport masterReport, StiRenderState state) +62
Stimulsoft.Report.Render.StiRenderProvider.Render(StiReport report, StiRenderState state) +683
Stimulsoft.Report.StiReport.Render(StiRenderState renderState) +862
Stimulsoft.Report.StiReport.Render() +42
Stimulsoft.Report.Render.StiRenderProvider.RenderFirstPass(StiReport report, StiNumberOfPass numberOfPass) +76
Stimulsoft.Report.Render.StiRenderProvider.Render(StiReport report, StiRenderState state) +96
Stimulsoft.Report.StiReport.Render(StiRenderState renderState) +862
Stimulsoft.Report.StiReport.Render(Boolean showProgress) +48
Stimulsoft.Report.Web.StiReportResponse.ResponseAsPdf(Page page, StiReport report, Boolean openDialog, StiPdfExportSettings settings) +31
Stimulsoft.Report.Web.StiReportResponse.ResponseAsPdf(Page page, StiReport report, StiPagesRange pageRange, Single imageQuality, Single imageResolution, Boolean embeddedFonts, Boolean standardPdfFonts, Boolean exportRtfTextAsImage, Boolean openDialog, String passwordUser, String passwordOwner, StiUserAccessPrivileges userAccessPrivileges, StiPdfEncryptionKeyLength keyLength, Boolean useUnicode) +126
Stimulsoft.Report.Web.StiReportResponse.ResponseAsPdf(Page page, StiReport report, StiPagesRange pageRange, Single imageQuality, Single imageResolution, Boolean embeddedFonts, Boolean standardPdfFonts, Boolean exportRtfTextAsImage, Boolean openDialog, String passwordUser, String passwordOwner, StiUserAccessPrivileges userAccessPrivileges, StiPdfEncryptionKeyLength keyLength) +51
Stimulsoft.Report.Web.StiReportResponse.ResponseAsPdf(Page page, StiReport report, StiPagesRange pageRange, Single imageQuality, Single imageResolution, Boolean embeddedFont, Boolean standardPdfFonts, Boolean openDialog, String passwordUser, String passwordOwner, StiUserAccessPrivileges userAccessPrivileges) +45
Stimulsoft.Report.Web.StiReportResponse.ResponseAsPdf(Page page, StiReport report) +66
OpportunityEdit.ShowQuote(Boolean ShowPrice) in C:\myAPPS\myCRM\CRM\Entry\Sales\OpportunityEdit.aspx.vb:1011
OpportunityEdit.lnkQuotation_Click(Object sender, EventArgs e) in C:\myAPPS\myCRM\CRM\Entry\Sales\OpportunityEdit.aspx.vb:877
System.Web.UI.WebControls.LinkButton.OnClick(EventArgs e) +90
System.Web.UI.WebControls.LinkButton.RaisePostBackEvent(String eventArgument) +76
System.Web.UI.WebControls.LinkButton.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +7
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +11
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +177
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1746




--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:2.0.50727.1433; ASP.NET Version:2.0.50727.1433
Vital
Posts: 1278
Joined: Fri Jun 09, 2006 4:04 am

Sometime I get Object Reference not set to an instance of an object.H

Post by Vital »

Hello,

Can you say this problem specified for some reports or for all reports?

Thank you.
fkmfkm
Posts: 181
Joined: Thu Jul 05, 2007 11:26 pm
Location: Kuala Lumpur

Sometime I get Object Reference not set to an instance of an object.H

Post by fkmfkm »

Hi,

I am talking about one report in particular...somestimes it happen sometimes no.
Edward
Posts: 2913
Joined: Fri Jun 09, 2006 4:02 am

Sometime I get Object Reference not set to an instance of an object.H

Post by Edward »

Hello.

These type of the error is hard to be fixed without a sample. We need that sample for providing a patch.

Please run this report in the EngineV2 version. This version you can get in the latest prerelease build available. Click in the Designer in any place outside the page and in the Property Editor for the Report object set EngineVersion = EngineV2.

New version engine do not uses subsystem which caused the error.

Thank you.
fkmfkm
Posts: 181
Joined: Thu Jul 05, 2007 11:26 pm
Location: Kuala Lumpur

Sometime I get Object Reference not set to an instance of an object.H

Post by fkmfkm »

U mean the V2 will solve this problem ? Ok . I try this V2
Edward
Posts: 2913
Joined: Fri Jun 09, 2006 4:02 am

Sometime I get Object Reference not set to an instance of an object.H

Post by Edward »

Hello,

Please inform us about results. If you attempt fails, then please send a sample to support[at]stimulsoft.com for analysis.

Thank you.
fkmfkm
Posts: 181
Joined: Thu Jul 05, 2007 11:26 pm
Location: Kuala Lumpur

Sometime I get Object Reference not set to an instance of an object.H

Post by fkmfkm »

I have download the latest prerelease..

How do I upgrade my version to the latest...? there seems to be so many files this time...

Edward
Posts: 2913
Joined: Fri Jun 09, 2006 4:02 am

Sometime I get Object Reference not set to an instance of an object.H

Post by Edward »

Yes, it is true. There are additional dlls. But in Web environment you do not need the following:

Stimulsoft.Report.Win.dll
Stimulsoft.Report.Design.dll
Stimulsoft.Report.Editor.dll

Thank you.
fkmfkm
Posts: 181
Joined: Thu Jul 05, 2007 11:26 pm
Location: Kuala Lumpur

Sometime I get Object Reference not set to an instance of an object.H

Post by fkmfkm »

I have tried copying all the files to my bin folder.

When I try to run my project i am getting lots of errors..

Error 10 'StiWebReport' is ambiguous in the namespace 'Stimulsoft.Report.Web'.
D:\NewSource\myCRM\CRM\Entry\Sales\OpportunityEdit.aspx 152

Error 22 'StiReport' is ambiguous in the namespace 'Stimulsoft.Report'. D:\NewSource\myCRM\CRM\Entry\Sales\OpportunityEdit.aspx.vb 907 20 http://localhost/myCRM/


Please Help
fkmfkm
Posts: 181
Joined: Thu Jul 05, 2007 11:26 pm
Location: Kuala Lumpur

Sometime I get Object Reference not set to an instance of an object.H

Post by fkmfkm »

Edward,

Can you help here ?
Post Reply