Sporadic "Value cannot be null" Exception

Stimulsoft Reports.NET discussion
Post Reply
nate
Posts: 2
Joined: Mon Jul 23, 2007 10:46 pm

Sporadic "Value cannot be null" Exception

Post by nate »

With both the release version and the 7/23 release we are running into the following exception when loading a report using the web preview control. The same report file displays fine in windows preview. There is one rtf field on the report that seems to be causing the issue. There are no images embedded in the rtf so I really don't know what is going on. Any help greatly appreciated.

-nate
-----
Exception
---------------

Value cannot be null.
Parameter name: image
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.ArgumentNullException: Value cannot be null.
Parameter name: image

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:


[ArgumentNullException: Value cannot be null.
Parameter name: image]
System.Drawing.Graphics.DrawImage(Image image, RectangleF destRect, RectangleF srcRect, GraphicsUnit srcUnit) +310167
Stimulsoft.Report.Components.StiRichText.GetImage(Single& zoom, StiExportFormat format) +1004
Stimulsoft.Report.Export.StiHtmlTableRender.RenderTable(Boolean renderStyles) +4142
Stimulsoft.Report.Export.StiHtmlExportService.ExportHtml(StiReport report, HtmlTextWriter writer, StiHtmlExportSettings settings, StiPagesCollection pages) +4198
Stimulsoft.Report.Export.StiHtmlExportService.ExportHtml(StiReport report, HtmlTextWriter writer, Double zoom, ImageFormat imageFormat, Int32 pageIndex, StiHtmlExportMode exportMode, StiHtmlExportQuality exportQuality) +228
Stimulsoft.Report.Web.StiWebViewer.RenderOnePage(Int32 page, StiHtmlExportService export) +298
Stimulsoft.Report.Web.StiWebViewer.RenderContents(HtmlTextWriter output) +2181
System.Web.UI.WebControls.WebControl.Render(HtmlTextWriter writer) +29
Stimulsoft.Report.Web.StiWebViewer.Render(HtmlTextWriter output) +546
System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +25
System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +121
System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +22
System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +130
System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +24
System.Web.UI.HtmlControls.HtmlForm.RenderChildren(HtmlTextWriter writer) +59
System.Web.UI.HtmlControls.HtmlForm.Render(HtmlTextWriter output) +68
System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +25
System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +121
System.Web.UI.HtmlControls.HtmlForm.RenderControl(HtmlTextWriter writer) +37
System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +130
System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +24
System.Web.UI.Page.Render(HtmlTextWriter writer) +26
System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +25
System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +121
System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +22
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1896


nate
Posts: 2
Joined: Mon Jul 23, 2007 10:46 pm

Sporadic "Value cannot be null" Exception

Post by nate »

Well,

It looks like the problem is that a percentage of our text field contained plain text data, these would cause the error below to be thrown. This doesn't happen on the windows forms side... would probably be helpfull for the next person if the web rtf conversion handled plain text or rtf or threw a specific format error when a non rtf text stream is encountered. (woulda saved me several hours at any rate :)

-nate
Guest
Posts: 182
Joined: Tue Jun 06, 2006 8:04 am

Sporadic "Value cannot be null" Exception

Post by Guest »

Send your report with rtf field to Image, and if possible, send some data for testing.
Also send mdc file(third button in the Preview window)

Thank you.
Post Reply