Print Page | Close Window

accessviolationexception with RC.Records.Add

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Report Control
Forum Description: Topics Related to Codejock Report Control
URL: http://forum.codejock.com/forum_posts.asp?TID=24152
Printed Date: 21 November 2024 at 7:35am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: accessviolationexception with RC.Records.Add
Posted By: sintra@sintra-sl.es
Subject: accessviolationexception with RC.Records.Add
Date Posted: 29 April 2021 at 6:32am
Hi,
I'm working with ReportControl v 18.0.1, Visual Studio 17 and C#.
The code normally works fine, but sometimes it gives an error:
"system.accessviolationexception en mscorlib.dll".
This occurs when running "ReportRecord Record = RCRemesas.Records.Add();"

Where is the problem??

Thanks.



           foreach (Remesa ObjRemesa in ArrayRemesas)
           {
                ReportRecord Record = RCRemesas.Records.Add();

                Record.AddItem(ObjRemesa.Id1);

              Record.AddItem(ObjRemesa.Numero1);//
   Record.AddItem(Convert.ToDateTime(Convert.ToDateTime(ObjRemesa.Fecha1).ToString("dd/MM/yy")));// 

                Record.AddItem(ObjRemesa.Estado1);// 
                Record.AddItem(ObjRemesa.IdCuentaCorriente1);

                Record.AddItem(BDRemesas.ObtenerTotalRemesa(ObjRemesa).ToString("#,##0.00"));                                        
           }




Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net