Posted 14 September 2017, 7:15 pm EST
[activereports_archive]Hi
I have a problem with CustomControl in SectionReport. The exception appears on PrintPreview and in Designer, if I set Height\Width from 0.01 to 0 in ActiveReport7 and ActiveReport9. Could you fix this bug?
Thanks
Code example:
[csharp] CustomControl customControl = new CustomControl(typeof(System.Windows.Forms.TextBox));
customControl.ImageType = ImageTypes.PNG;
customControl.Width = 10;
customControl.Height = 0.01f;
detail.Controls.Add(customControl);[/csharp]
On PrintPreview an exception appears:
Parameter is not valid.
at System.Drawing.Bitmap…ctor(Int32 width, Int32 height, PixelFormat format)
at System.Drawing.Bitmap…ctor(Int32 width, Int32 height)
at GrapeCity.ActiveReports.SectionReportModel.CustomControl.#dCn(Object control, Graphics g, ImageTypes imageType, Rectangle drawRect)
at GrapeCity.ActiveReports.SectionReportModel.CustomControl.#LYA(GraphicsCache cache, Page page, PointF pageOffset, Single startPos, Single endPos)
at GrapeCity.ActiveReports.SectionReportModel.ARControl.Render(GraphicsCache gRef, Page page, PointF pageOffset, Single startPos, Single endPos)
at GrapeCity.ActiveReports.SectionReportModel.Section.Render(GraphicsCache cache, Page page, #Ppb drawingLog, PointF pageOffset, Single pageWidth, Single drawStartPos, Single drawEndPos)
at GrapeCity.ActiveReports.SectionReportModel.Section.Render(GraphicsCache cache, #rqb rData, #Ppb drawingLog)
at #sxA.#mqb.#LDb()
at #sxA.#mqb.#SDb(Section section, Int32 insPos)
at #sxA.#mqb.#SDb(Section section)
at #sxA.#vqb.#vEb()
at #sxA.#vqb.#bZA(Page newPage, Single left, Single top, Single right, Single bottom, UInt32 flags, UInt32& status)
at GrapeCity.ActiveReports.SectionReport.#4yb()
at GrapeCity.ActiveReports.SectionReport.Run(Boolean syncDocument)
at GrapeCity.ActiveReports.SectionReport.Run()
[/activereports_archive]