<?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 : Value change / Revert automaticly</title>
  <link>http://forum.codejock.com/</link>
  <description><![CDATA[This is an XML content feed of; Codejock Developer Community : Report Control : Value change / Revert automaticly]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Tue, 12 May 2026 19:10:31 +0000</pubDate>
  <lastBuildDate>Wed, 27 Dec 2023 08:16:12 +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=24445</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[Value change / Revert automaticly : Problem : if item caption is changed...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=24445&amp;PID=78828&amp;title=value-change-revert-automaticly#78828</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=3198">simps</a><br /><strong>Subject:</strong> 24445<br /><strong>Posted:</strong> 27 December 2023 at 8:16am<br /><br /><div><font color="#242424" face="Arial, Helvetica, sans-serif" size="2">Problem : if item caption is changed once, it's not able to be changed again manually.</font></div><div><font color="#242424" face="Arial, Helvetica, sans-serif" size="2"><br></font></div><div><font color="#242424" face="Arial, Helvetica, sans-serif" size="2">to see my problem clearly;</font></div><div><font color="#242424" face="Arial, Helvetica, sans-serif" size="2"><span style="white-space:pre">	</span>vb6 / new project</font></div><div><font color="#242424" face="Arial, Helvetica, sans-serif" size="2"><span style="white-space:pre">	</span>add reportcontrol1</font></div><div><font color="#242424" face="Arial, Helvetica, sans-serif" size="2"><span style="white-space:pre">	</span>copy &amp; paste the code below.</font></div><div><br></div><div><img src="https://i.ibb.co/9rp1vXD/test.png" height="259" width="551" border="0" /><br></div><div><font color="#242424" face="Arial, Helvetica, sans-serif" size="2"><br></font></div><div><font color="#242424"><div style=""><font face="Arial, Helvetica, sans-serif" size="1">Option Explicit</font></div><div style=""><font face="Arial, Helvetica, sans-serif" size="1"><br></font></div><div style=""><font face="Arial, Helvetica, sans-serif" size="1">Private Sub Form_Load()</font></div><div style=""><font face="Arial, Helvetica, sans-serif" size="1">&nbsp; &nbsp; Dim newRec As ReportRecord</font></div><div style=""><font face="Arial, Helvetica, sans-serif" size="1">&nbsp; &nbsp; With ReportControl1</font></div><div style=""><font face="Arial, Helvetica, sans-serif" size="1">&nbsp; &nbsp; &nbsp; &nbsp; .SetCustomDraw (xtpCustomBeforeDrawRow)</font></div><div style=""><font face="Arial, Helvetica, sans-serif" size="1">&nbsp; &nbsp; &nbsp; &nbsp; .Columns.Add 0, "Add", 100, True</font></div><div style=""><font face="Arial, Helvetica, sans-serif" size="1">&nbsp; &nbsp; &nbsp; &nbsp; .Columns.Add 1, "Part Name / Component", 200, True</font></div><div style=""><font face="Arial, Helvetica, sans-serif" size="1">&nbsp; &nbsp; &nbsp; &nbsp; .Columns.Add 2, "Purchase Order Qty", 100, True</font></div><div style=""><font face="Arial, Helvetica, sans-serif" size="1">&nbsp; &nbsp; &nbsp; &nbsp; .Columns.Add 3, "Production Order Qty", 100, True</font></div><div style=""><font face="Arial, Helvetica, sans-serif" size="1">&nbsp; &nbsp; &nbsp; &nbsp; .Columns(1).TreeColumn = True</font></div><div style=""><font face="Arial, Helvetica, sans-serif" size="1">&nbsp; &nbsp; &nbsp; &nbsp; Set newRec = .Records.Add</font></div><div style=""><font face="Arial, Helvetica, sans-serif" size="1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; newRec.AddItem ""</font></div><div style=""><font face="Arial, Helvetica, sans-serif" size="1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; newRec.Item(0).HasCheckbox = True</font></div><div style=""><font face="Arial, Helvetica, sans-serif" size="1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; newRec.AddItem "Car"</font></div><div style=""><font face="Arial, Helvetica, sans-serif" size="1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; newRec.AddItem 2</font></div><div style=""><font face="Arial, Helvetica, sans-serif" size="1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; newRec.AddItem 2</font></div><div style=""><font face="Arial, Helvetica, sans-serif" size="1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; newRec.Item(0).HasCheckbox = True</font></div><div style=""><font face="Arial, Helvetica, sans-serif" size="1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; .Populate</font></div><div style=""><font face="Arial, Helvetica, sans-serif" size="1">&nbsp; &nbsp; &nbsp; &nbsp; Set newRec = .Rows(0).Record.Childs.Add</font></div><div style=""><font face="Arial, Helvetica, sans-serif" size="1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; newRec.AddItem ""</font></div><div style=""><font face="Arial, Helvetica, sans-serif" size="1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; newRec.Item(0).HasCheckbox = True</font></div><div style=""><font face="Arial, Helvetica, sans-serif" size="1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; newRec.AddItem "Part-A"</font></div><div style=""><font face="Arial, Helvetica, sans-serif" size="1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; newRec.AddItem 4</font></div><div style=""><font face="Arial, Helvetica, sans-serif" size="1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; newRec.AddItem 4</font></div><div style=""><font face="Arial, Helvetica, sans-serif" size="1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; newRec.Item(0).HasCheckbox = True</font></div><div style=""><font face="Arial, Helvetica, sans-serif" size="1">&nbsp; &nbsp; &nbsp; &nbsp; Set newRec = .Rows(0).Record.Childs.Add</font></div><div style=""><font face="Arial, Helvetica, sans-serif" size="1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; newRec.AddItem ""</font></div><div style=""><font face="Arial, Helvetica, sans-serif" size="1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; newRec.Item(0).HasCheckbox = True</font></div><div style=""><font face="Arial, Helvetica, sans-serif" size="1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; newRec.AddItem "Part-B"</font></div><div style=""><font face="Arial, Helvetica, sans-serif" size="1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; newRec.AddItem 4</font></div><div style=""><font face="Arial, Helvetica, sans-serif" size="1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; newRec.AddItem 4</font></div><div style=""><font face="Arial, Helvetica, sans-serif" size="1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; newRec.Item(0).HasCheckbox = True</font></div><div style=""><font face="Arial, Helvetica, sans-serif" size="1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Set newRec = .Rows(0).Record.Childs.Add</font></div><div style=""><font face="Arial, Helvetica, sans-serif" size="1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; newRec.AddItem ""</font></div><div style=""><font face="Arial, Helvetica, sans-serif" size="1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; newRec.Item(0).HasCheckbox = True</font></div><div style=""><font face="Arial, Helvetica, sans-serif" size="1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; newRec.AddItem "Part-C"</font></div><div style=""><font face="Arial, Helvetica, sans-serif" size="1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; newRec.AddItem 2</font></div><div style=""><font face="Arial, Helvetica, sans-serif" size="1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; newRec.AddItem 2</font></div><div style=""><font face="Arial, Helvetica, sans-serif" size="1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; newRec.Item(0).HasCheckbox = True</font></div><div style=""><font face="Arial, Helvetica, sans-serif" size="1">&nbsp; &nbsp; &nbsp; &nbsp; newRec.ParentRecord.Expanded = True</font></div><div style=""><font face="Arial, Helvetica, sans-serif" size="1">&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</font></div><div style=""><font face="Arial, Helvetica, sans-serif" size="1">&nbsp; &nbsp; &nbsp; &nbsp; .Columns(1).Editable = False</font></div><div style=""><font face="Arial, Helvetica, sans-serif" size="1">&nbsp; &nbsp; &nbsp; &nbsp; .Columns(2).Editable = False</font></div><div style=""><font face="Arial, Helvetica, sans-serif" size="1">&nbsp; &nbsp; &nbsp; &nbsp; .Populate</font></div><div style=""><font face="Arial, Helvetica, sans-serif" size="1">&nbsp; &nbsp; &nbsp; &nbsp; .AllowEdit = True</font></div><div style=""><font face="Arial, Helvetica, sans-serif" size="1">&nbsp; &nbsp; End With</font></div><div style=""><font face="Arial, Helvetica, sans-serif" size="1">End Sub</font></div><div style=""><font face="Arial, Helvetica, sans-serif" size="1"><br></font></div><div style=""><font face="Arial, Helvetica, sans-serif" size="1">Private Sub Form_Resize()</font></div><div style=""><font face="Arial, Helvetica, sans-serif" size="1">&nbsp; &nbsp; ReportControl1.Move 120, 120, Me.ScaleWidth - 240, Me.ScaleHeight - 240</font></div><div style=""><font face="Arial, Helvetica, sans-serif" size="1">End Sub</font></div><div style=""><font face="Arial, Helvetica, sans-serif" size="1"><br></font></div><div style=""><font face="Arial, Helvetica, sans-serif" size="1">Private Sub ReportControl1_BeforeDrawRow(ByVal Row As XtremeReportControl.IReportRow, ByVal Item As XtremeReportControl.IReportRecordItem, ByVal Metrics As XtremeReportControl.IReportRecordItemMetrics)</font></div><div style=""><font face="Arial, Helvetica, sans-serif" size="1">&nbsp; &nbsp; If Item.Index = 3 Then Metrics.BackColor = vbYellow</font></div><div style=""><font face="Arial, Helvetica, sans-serif" size="1">End Sub</font></div><div style=""><font face="Arial, Helvetica, sans-serif" size="1"><br></font></div><div style=""><font face="Arial, Helvetica, sans-serif" size="1">Private Sub ReportControl1_ValueChanged(ByVal Row As XtremeReportControl.IReportRow, ByVal Column As XtremeReportControl.IReportColumn, ByVal Item As XtremeReportControl.IReportRecordItem)</font></div><div style=""><font face="Arial, Helvetica, sans-serif" size="1">&nbsp; &nbsp; If Row.RowTreeLevel = 0 Then</font></div><div style=""><font face="Arial, Helvetica, sans-serif" size="1">&nbsp; &nbsp; &nbsp; &nbsp; Dim rr As ReportRow</font></div><div style=""><font face="Arial, Helvetica, sans-serif" size="1">&nbsp; &nbsp; &nbsp; &nbsp; Dim multi</font></div><div style=""><font face="Arial, Helvetica, sans-serif" size="1">&nbsp; &nbsp; &nbsp; &nbsp; multi = Row.Record.Item(2).Caption / Row.Record.Item(3).Caption</font></div><div style=""><font face="Arial, Helvetica, sans-serif" size="1">&nbsp; &nbsp; &nbsp; &nbsp; For Each rr In Row.Childs</font></div><div style=""><font face="Arial, Helvetica, sans-serif" size="1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; rr.Record.Item(3).Caption = CDbl(rr.Record.Item(2).Caption) / multi</font></div><div style=""><font face="Arial, Helvetica, sans-serif" size="1">&nbsp; &nbsp; &nbsp; &nbsp; Next</font></div><div style=""><font face="Arial, Helvetica, sans-serif" size="1">&nbsp; &nbsp; &nbsp; &nbsp; ReportControl1.Populate</font></div><div style=""><font face="Arial, Helvetica, sans-serif" size="1">&nbsp; &nbsp; End If</font></div><div style=""><font face="Arial, Helvetica, sans-serif" size="1">End Sub</font></div><div style="font-size: 14.6667px;"><br></div></font></div>]]>
   </description>
   <pubDate>Wed, 27 Dec 2023 08:16:12 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=24445&amp;PID=78828&amp;title=value-change-revert-automaticly#78828</guid>
  </item> 
 </channel>
</rss>