search envelope-o feed check
Home Unanswered Active Tags New Question
user comment-o

Image Export: CCCCCC is not a valid value for Int32

Asked by Jeremy
15 years ago.

I am attempting to use the DayPilotCalendar.Export functionality to create a *.png image. Per the examples, I have used:

296 Response.Clear()
297 Response.ContentType = "image/png"
298 Dim myScheduleImage As MemoryStream = dpCalendar.Export(ImageFormat.Png)
299 myScheduleImage.WriteTo(Response.OutputStream)
300 Response.End()

The exception gets thrown at dpCalendar.Export() with: "CCCCCC is not a valid value for Int32". Any ideas? Thanks for your help.

Stack trace is below:

[FormatException: Input string was not in a correct format.]
System.Number.StringToNumber(String str, NumberStyles options, NumberBuffer& number, NumberFormatInfo info, Boolean parseDecimal) +7469351
System.Number.ParseInt32(String s, NumberStyles style, NumberFormatInfo info) +119
System.ComponentModel.Int32Converter.FromString(String value, NumberFormatInfo formatInfo) +53
System.ComponentModel.BaseNumberConverter.ConvertFrom(ITypeDescriptorContext context, CultureInfo culture, Object value) +376

[Exception: CCCCCC is not a valid value for Int32.]
System.ComponentModel.BaseNumberConverter.ConvertFrom(ITypeDescriptorContext context, CultureInfo culture, Object value) +516
System.ComponentModel.TypeConverter.ConvertFromString(ITypeDescriptorContext context, CultureInfo culture, String text) +16
System.Drawing.ColorConverter.ConvertFrom(ITypeDescriptorContext context, CultureInfo culture, Object value) +1038288
System.ComponentModel.TypeConverter.ConvertFromString(String text) +12
System.Drawing.ColorTranslator.FromHtml(String htmlColor) +674
DayPilot.Web.Ui.Export.CalendarExport.drawEvent(Graphics g, Hashtable e) +541
DayPilot.Web.Ui.Export.CalendarExport.drawEvents(Graphics g) +144
DayPilot.Web.Ui.Export.CalendarExport.getScrollArea() +742
DayPilot.Web.Ui.Export.CalendarExport.Export(ImageFormat format) +2580
DayPilot.Web.Ui.DayPilotCalendar.Export(ImageFormat format, Int32 scrollPosition) +143
DayPilot.Web.Ui.DayPilotCalendar.Export(ImageFormat format) +38
Appointments_BookingSchedule.btnPrint_Click(Object sender, EventArgs e) in C:\Documents and Settings\jhuntsman\My Documents\Visual Studio 2008\Projects\IrelandDash\Ireland Dashboard\Appointments\BookingSchedule.aspx.vb:298
System.Web.UI.WebControls.Button.OnClick(EventArgs e) +111
System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +110
System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +10
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +13
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +36
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1565

Answer posted by Jeremy
15 years ago.

Okay...second time I've posted and resolved my own issue, my apologies. I discovered a particular event color was being set to "CCCCCC" rather than "#CCCCCC". Once that was changed the issue above was resolved. Thanks.

This question is more than 1 months old and has been closed. Please create a new question if you have anything to add.