<?xml version="1.0" encoding="utf-8" ?>
<?xml-stylesheet type="text/xsl" href="RSS_xslt_style.asp" version="1.0" ?>
<rss version="2.0" xmlns:WebWizForums="https://syndication.webwiz.net/rss_namespace/">
 <channel>
  <title>Codejock Developer Community : ReportControl in VirtualMode, Access Violation</title>
  <link>http://forum.codejock.com/</link>
  <description><![CDATA[This is an XML content feed of; Codejock Developer Community : Report Control : ReportControl in VirtualMode, Access Violation]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Sat, 02 May 2026 00:17:35 +0000</pubDate>
  <lastBuildDate>Tue, 17 Jul 2018 05:01:43 +0000</lastBuildDate>
  <docs>http://blogs.law.harvard.edu/tech/rss</docs>
  <generator>Web Wiz Forums 12.04</generator>
  <ttl>360</ttl>
  <WebWizForums:feedURL>forum.codejock.com/RSS_post_feed.asp?TID=23682</WebWizForums:feedURL>
  <image>
   <title><![CDATA[Codejock Developer Community]]></title>
   <url>http://forum.codejock.com/forum_images/codejock-logo.gif</url>
   <link>http://forum.codejock.com/</link>
  </image>
  <item>
   <title><![CDATA[ReportControl in VirtualMode, Access Violation : Hi, i&amp;#039;m working with VB.Net...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=23682&amp;PID=76939&amp;title=reportcontrol-in-virtualmode-access-violation#76939</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=8844">sintra@sintra-sl.es</a><br /><strong>Subject:</strong> 23682<br /><strong>Posted:</strong> 17 July 2018 at 5:01am<br /><br />Hi, i'm working with VB.Net 17 and Codejock 18.0 ActiveX<div><br></div><div>I need use a ReportControl with many records and then i want use VirtualMode of ReportControl.</div><div><br></div><div>My project is MDI and the ReportControl is loaded in a form child.</div><div><br></div><div>The problem is when i load and unload the child form several times. The first or second times ReportControl load fine, but in the 3ª load of the form when execute "ReportControl.Populate()" then error:</div><div>"'System.AccessViolationException' en mscorlib.dll"</div><div><br></div><div>Any suggestion??</div><div><br></div><div>Thanks</div><div><br></div><div>Now my code, RCClientes is a ReportControl and FrmClientesFichero is my child form.</div><div><br></div><blockquote style="margin: 0 0 0 40px; border: n&#111;ne; padding: 0px;"><div><div>&nbsp; &nbsp; Private Sub FrmClientesFichero_Load(sender As Object, e As EventArgs) Handles Me.Load</div></div><div><div><br></div></div><div><div>&nbsp; &nbsp; &nbsp; &nbsp; With RCClientes</div></div><div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; .PaintManager.CaptionFont.Name = "Tahoma"</div></div><div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; .PaintManager.CaptionFont.Bold = True</div></div><div><div><br></div></div><div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; .PaintManager.TextFont.Name = "Tahoma"</div></div><div><div><br></div></div><div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; .PaintManager.UseAlternativeBackground = True</div></div><div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; .PaintManager.AlternativeBackgroundColor = CUInt(RGB(242, 242, 242))</div></div><div><div><br></div></div><div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; .PaintManager.FreezeColsDividerColor = CUInt(RGB(0, 0, 0))</div></div><div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; .PaintManager.NoItemsText = "No hay elementos que mostrar"</div></div><div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; .FullColumnScrolling = True</div></div><div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; .AutoColumnSizing = False</div></div><div><div><br></div></div><div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; .FocusSubItems = False</div></div><div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; .PaintManager.ShowNonActiveInPlaceButton = True</div></div><div><div><br></div></div><div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; .ScrollModeH = XTPReportScrollMode.xtpReportScrollModeSmooth</div></div><div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; .ScrollModeV = XTPReportScrollMode.xtpReportScrollModeSmooth</div></div><div><div><br></div></div><div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; .AllowSort = False</div></div><div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; .Records.DeleteAll()</div></div><div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; .Columns.DeleteAll()</div></div><div><div><br></div></div><div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; .Populate()</div></div><div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; .Navigator.MoveLastRow()</div></div><div><div>&nbsp; &nbsp; &nbsp; &nbsp; End With</div></div><div><div><br></div></div><div><div>&nbsp; &nbsp; &nbsp; &nbsp; '''''''''''</div></div><div><div>&nbsp; &nbsp; &nbsp; &nbsp; RCClientes.PaintManager.ColumnStyle = XTPReportColumnStyle.xtpColumnResource</div></div><div><div>&nbsp; &nbsp; &nbsp; &nbsp; RCClientes.AllowEdit = False</div></div><div><div>&nbsp; &nbsp; &nbsp; &nbsp; RCClientes.Columns.Add(COL_ID, "C. Cliente", 100, True)</div></div><div><div>&nbsp; &nbsp; &nbsp; &nbsp; RCClientes.Columns.Add(COL_RAZONSOCIAL, "Razón Social", 100, True)</div></div><div><div>&nbsp; &nbsp; &nbsp; &nbsp; RCClientes.Columns.Add(COL_NOMBRECOMERCIAL, "Nombre Comercial", 250, True)</div></div><div><div>&nbsp; &nbsp; &nbsp; &nbsp; RCClientes.Columns.Add(COL_CIF, "CIF / NIF", 60, True)</div></div><div><div>&nbsp; &nbsp; &nbsp; &nbsp; RCClientes.Columns.Add(COL_CP, "CP", 100, True)</div></div><div><div>&nbsp; &nbsp; &nbsp; &nbsp; RCClientes.Columns.Add(COL_POBLACION, "Población", 100, True)</div></div><div><div>&nbsp; &nbsp; &nbsp; &nbsp; RCClientes.Columns.Add(COL_PROVINCIA, "Provincia", 250, True)</div></div><div><div>&nbsp; &nbsp; &nbsp; &nbsp; RCClientes.Columns.Add(COL_TELEFONO, "Telefono", 60, True)</div></div><div><div>&nbsp; &nbsp; &nbsp; &nbsp; RCClientes.Columns.Add(COL_EMAIL, "Email", 100, True)</div></div><div><div>&nbsp; &nbsp; &nbsp; &nbsp; RCClientes.Columns.Add(COL_IBAN, "IBAN", 250, True)</div></div><div><div>&nbsp; &nbsp; &nbsp; &nbsp; RCClientes.Columns.Add(COL_ESTADO, "Estado", 60, True)</div></div><div><div>&nbsp; &nbsp; &nbsp; &nbsp; '''''''''''</div></div><div><div><br></div></div><div><div>&nbsp; &nbsp; &nbsp; &nbsp; ''''''''''</div></div><div><div>&nbsp; &nbsp; &nbsp; &nbsp; Dim ArrayProvincias As New ArrayList()</div></div><div><div>&nbsp; &nbsp; &nbsp; &nbsp; Dim Record As XtremeReportControl.ReportRecord</div></div><div><div>&nbsp; &nbsp; &nbsp; &nbsp; ArrayProvincias = ObtenerTodasLasProvincias()</div></div><div><div>&nbsp; &nbsp; &nbsp; &nbsp; Arrayclientes = ObtenerTodosLosClientes(ArrayProvincias)</div></div><div><div><br></div></div><div><div>&nbsp; &nbsp; &nbsp; &nbsp; RCClientes.SetVirtualMode(Arrayclientes.Count, 0)</div></div><div><div><br></div></div><div><div>&nbsp; &nbsp; &nbsp; &nbsp; Record = RCClientes.Records(0)</div></div><div><div>&nbsp; &nbsp; &nbsp; &nbsp; Record.AddItem("")</div></div><div><div>&nbsp; &nbsp; &nbsp; &nbsp; Record.AddItem("")</div></div><div><div>&nbsp; &nbsp; &nbsp; &nbsp; Record.AddItem("")</div></div><div><div>&nbsp; &nbsp; &nbsp; &nbsp; Record.AddItem("")</div></div><div><div>&nbsp; &nbsp; &nbsp; &nbsp; Record.AddItem("")</div></div><div><div>&nbsp; &nbsp; &nbsp; &nbsp; Record.AddItem("")</div></div><div><div>&nbsp; &nbsp; &nbsp; &nbsp; Record.AddItem("")</div></div><div><div>&nbsp; &nbsp; &nbsp; &nbsp; Record.AddItem("")</div></div><div><div>&nbsp; &nbsp; &nbsp; &nbsp; Record.AddItem("")</div></div><div><div>&nbsp; &nbsp; &nbsp; &nbsp; Record.AddItem("")</div></div><div><div>&nbsp; &nbsp; &nbsp; &nbsp; Record.AddItem("")</div></div><div><div><br></div></div><div><div>&nbsp; &nbsp; &nbsp; &nbsp; Record.AddItem("")</div></div><div><div><br></div></div><div><div>&nbsp; &nbsp; &nbsp; &nbsp; RCClientes.Populate()</div></div></blockquote><blockquote style="margin: 0 0 0 40px; border: n&#111;ne; padding: 0px;"><blockquote style="margin: 0 0 0 40px; border: n&#111;ne; padding: 0px;"><div><div>&nbsp; &nbsp; RCClientes.SetCustomDraw(XtremeReportControl.XTPReportCustomDraw.xtpCustomBeforeDrawRow)</div></div></blockquote></blockquote><blockquote style="margin: 0 0 0 40px; border: n&#111;ne; padding: 0px;"><div><div>&nbsp; &nbsp; &nbsp; &nbsp; ''''''''''</div></div><div><div><br></div></div><div><div>&nbsp; &nbsp; End Sub</div></div></blockquote><div><br></div>]]>
   </description>
   <pubDate>Tue, 17 Jul 2018 05:01:43 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=23682&amp;PID=76939&amp;title=reportcontrol-in-virtualmode-access-violation#76939</guid>
  </item> 
 </channel>
</rss>