<?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 : GroupFormula and GroupCaption together</title>
  <link>http://forum.codejock.com/</link>
  <description><![CDATA[This is an XML content feed of; Codejock Developer Community : Report Control : GroupFormula and GroupCaption together]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Wed, 13 May 2026 00:57:17 +0000</pubDate>
  <lastBuildDate>Sun, 05 May 2013 21:05:14 +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=21629</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[GroupFormula and GroupCaption together :  I&#194;&#180;m trying to use together...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=21629&amp;PID=70909&amp;title=groupformula-and-groupcaption-together#70909</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=8050">mpereda</a><br /><strong>Subject:</strong> 21629<br /><strong>Posted:</strong> 05 May 2013 at 9:05pm<br /><br />I´m trying to use together the GroupFormula and GroupCaption to sum the values of a column and count the children records of the group. <div>&nbsp;</div><div>The best I have is this, that I took from the forum&nbsp;: </div><div>&nbsp;</div><div><table width="99%"><tr><td><pre class="BBcode"></div><div>Private Sub RCConsultasFinanceiro_BeforeDrawRow(ByVal Row As XtremeReportControl.IReportRow, ByVal Item As XtremeReportControl.IReportRecordItem, ByVal Metrics As XtremeReportControl.IReportRecordItemMetrics)<br>&nbsp;&nbsp;&nbsp; Dim rcGroupRow As XtremeReportControl.ReportGroupRow<br>&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp; If Not Row.groupRow Then<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; If RCConsultasFinanceiro.Columns(Item.Index).Tag = "M" Then<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Metrics.Text = Format(Item.Caption, "R$ ##.00")<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; End If<br>&nbsp;&nbsp;&nbsp; Else<br>&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Set rcGroupRow = Row<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Metrics.Text = rcGroupRow.GroupCaption &amp; " (" &amp; rcGroupRow.Childs.Count &amp; ") "<br>&nbsp;<br>&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp; End If<br>End Sub</div><div>&nbsp;</div><div>Private Sub RCConsultasFinanceiro_GroupOrderChangedEx(ByVal Column As XtremeReportControl.IReportColumn, ByVal Reason As XtremeReportControl.XTPReportColumnOrderChangedReason)<br>&nbsp;&nbsp;&nbsp; Dim i As Integer<br>&nbsp;&nbsp;&nbsp; Dim j As Integer<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp; Dim Row As ReportRow<br>&nbsp;&nbsp;&nbsp; Dim groupRow As ReportGroupRow<br>&nbsp;&nbsp; <br>&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp; If Reason &amp; xtpReportColumnAddedToGroupby Then<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; For i = 0 To RCConsultasFinanceiro.Rows.Count - 1<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Set Row = RCConsultasFinanceiro.Rows(i)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; If Row.groupRow Then<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; sumSub = ""<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Set groupRow = Row<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; For j = 0 To RCConsultasFinanceiro.Columns.Count - 1<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; If RCConsultasFinanceiro.Columns(j).Tag = "M" Then&nbsp;&nbsp; ''If numeric<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; groupRow.GroupFormat = "%.02f"<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; sumSub = sumSub &amp; " SUMSUB(C" &amp; j &amp; ":C" &amp; j + 1 &amp; ")"<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; End If<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Next<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; groupRow.GroupFormula = sumSub<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; End If<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Next<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp; End If<br>RCConsultasFinanceiro.ReCalc True<br>End Sub<br><div></pre></td></tr></table></div></div><div>the problem with this code is that the record count is shown&nbsp; together with the total column value instead with the group caption that is where I prefere</div><div>&nbsp;</div><div>I´m using vb6 activex 15.3.1</div><div>&nbsp;</div><div>Thanks in advance for the help.</div>]]>
   </description>
   <pubDate>Sun, 05 May 2013 21:05:14 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=21629&amp;PID=70909&amp;title=groupformula-and-groupcaption-together#70909</guid>
  </item> 
 </channel>
</rss>