Error: A generic error occurred in GDI+.

Stimulsoft Reports.NET discussion
VaDRo
Posts: 25
Joined: Mon Dec 15, 2014 5:47 pm

Re: Error: A generic error occurred in GDI+.

Post by VaDRo »

I loaded your latest trial version. When I linked updated DLLs to my app, I've got the same error:

Code: Select all

---------------------------
Application Error
---------------------------
An error occurred please contact the adminstrator with the following information:
A generic error occurred in GDI+.
Stack Trace:
   at System.Drawing.Graphics.CheckErrorStatus(Int32 status)
   at System.Drawing.Graphics.FillRectangle(Brush brush, Int32 x, Int32 y, Int32 width, Int32 height)
   at System.Drawing.Graphics.FillRectangle(Brush brush, Rectangle rect)
   at Stimulsoft.Report.Viewer.StiPageViewControl.OnPaint(PaintEventArgs e)
   at System.Windows.Forms.Control.PaintWithErrorHandling(PaintEventArgs e, Int16 layer)
   at System.Windows.Forms.Control.WmPaint(Message& m)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
---------------------------
Abort   Retry   Ignore   
---------------------------
VaDRo
Posts: 25
Joined: Mon Dec 15, 2014 5:47 pm

Re: Error: A generic error occurred in GDI+.

Post by VaDRo »

Aleksey Andreyanov wrote: If the error still occurs, please, send us a sample report template with data.
That error occurs when I'm trying to show rendered report with code

Code: Select all

reportCtrl.Show()
Please, tell me - how can I build sample template with data? Data for my template is loaded from DB. How can I save template with loaded data?
VaDRo
Posts: 25
Joined: Mon Dec 15, 2014 5:47 pm

Re: Error: A generic error occurred in GDI+.

Post by VaDRo »

Update:
When I ran report from Designer, I've got posititve result - all data with signatures was displayed on the Preview page. But when I'm trying to run report from my application, I don't see any signatures. The parameters of the report are the same in both tests. But when I'm running report from Designer - I see that Designer.exe uses 2 gb of memory. When I used 2011 version of Stimulsoft Reports, Designer.exe used approx 2.8 gb.

Some additional statistics:
- in each row of report is single Image object with client's signature
- approximately from 800 pages report builder start to throw exceptions or hides images after report rendering
- when report builder renders report with 400 pages - there are no problems with images on the report pages
- when report builder is in "silent" mode (when I'm not call reportCtrl.Show()) - there are no exceptions, but all Images are lost. When i'm calling reportCtrl.Show(), then report control produces exceptions. Exceptions specified in previous posts.
- during rendering of report with 800 pages my application uses more than 2 gb memory.
Alex K.
Posts: 6488
Joined: Thu Jul 29, 2010 2:37 am

Re: Error: A generic error occurred in GDI+.

Post by Alex K. »

Hello,

Can you please send us on support@stimulsoft.com a sample project with test data which reproduce the issue for analysis.

Thank you.
VaDRo
Posts: 25
Joined: Mon Dec 15, 2014 5:47 pm

Re: Error: A generic error occurred in GDI+.

Post by VaDRo »

Aleksey, how can I send you test data? What format I have to use?
Alex K.
Posts: 6488
Joined: Thu Jul 29, 2010 2:37 am

Re: Error: A generic error occurred in GDI+.

Post by Alex K. »

Hello,

Any format which we can use in your report - .csv, xml, database script or dump.
For saving data as XML you can use the following code in BeforePrint event of Page:
{YourDataTableName}.DataTable.DataSet.WriteXml("e:\\data.xml");
{YourDataTableName}.DataTable.DataSet.WriteXmlSchema("e:\\data.xsd");

Thank you.
VaDRo
Posts: 25
Joined: Mon Dec 15, 2014 5:47 pm

Re: Error: A generic error occurred in GDI+.

Post by VaDRo »

Actually, I prepared test project and database script for You. I've seen your code with XML too late.

Rendrering of report produces "Out of memory exception" In new project.
Attachments
testStimulsoftf.zip
Test project with test data
(5.64 MiB) Downloaded 180 times
HighAley
Posts: 8431
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: Error: A generic error occurred in GDI+.

Post by HighAley »

Hello.

Could you specify which version do you use?
As we see you use 2011.1.1000.
Please, try our latest build.

Thank you.
VaDRo
Posts: 25
Joined: Mon Dec 15, 2014 5:47 pm

Re: Error: A generic error occurred in GDI+.

Post by VaDRo »

Aleksey, yes, i'm using 2011.1.1000. From one hand, I have problems with updating current version to latest build (I've got this project from other programmers and they are fired. I even don't know how to upgrade current version :) From other hand, I tried to use your latest trial version. It has the same problem.

Thank you for your assistance. With hope to get other proposals
VaDRo
Posts: 25
Joined: Mon Dec 15, 2014 5:47 pm

Re: Error: A generic error occurred in GDI+.

Post by VaDRo »

Aleksey, please, tell me - did You do tests for my sample project with your latest build?
Can you give me answer - which version of Stimulsoft could work with specified test data without exceptions and errors?
Post Reply