Print Page | Close Window

Formating Sum Result in group formula

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=16747
Printed Date: 28 September 2024 at 12:48pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Formating Sum Result in group formula
Posted By: Zeus
Subject: Formating Sum Result in group formula
Date Posted: 24 May 2010 at 4:28pm
I used the nex code in a groupformula :

Private Sub GrdInstancias_GroupOrderChangedEx(ByVal Column As XtremeReportControl.IReportColumn, ByVal Reason As XtremeReportControl.XTPReportColumnOrderChangedReason)

  Dim i As Integer
    Dim Row As ReportRow
    Dim groupRow As ReportGroupRow
    Dim xRecord As XtremeReportControl.ReportRecord
    Dim xRecordItem As XtremeReportControl.ReportRecordItem

    If Reason & xtpReportColumnAddedToGroupby Then
        For i = 0 To GrdInstancias.Rows.Count - 1
            Set Row = GrdInstancias.Rows(i)
            If Row.groupRow Then
                Set groupRow = Row
                   
                    groupRow.GroupFormat = " Subtotal Gs. " & "%0f"
                    groupRow.GroupFormula = "SUMSUB(R*C8:R*C9)"
                    groupRow.GroupCaption = "x"
            End If
        Next
    End If

End Sub

These code work perfect but mi problem is that i need the result in this format 1.000.598 with thousen separator
how can i do that? i read all the documentation for the report control but i dont find a solve
any help will be apreciated
Tks





Replies:
Posted By: Aaron
Date Posted: 25 May 2010 at 3:59pm
Hi,
 
Would be better if Regional settings would control the GroupFormat, looks like you get stuck without thousands separator but maybe CJ will fix this in next release
 


-------------
Product: Xtreme SuitePro (ActiveX) version 15.0.2
Platform: Windows XP (32bit) - SP 2
Language: Visual Basic 6.0

Zero replies is not an option....


Posted By: Zeus
Date Posted: 25 May 2010 at 6:42pm
hi Aaron tks for the reply how i do that? i confussed


Posted By: Aaron
Date Posted: 26 May 2010 at 10:22am
Hi,
 
I don't see a way to get the thousands separator into a GroupFormat with last version so the only option is to submit a request and hope CodeJock will add this in next release. Just write to support http://www.codejock.com/support/ - http://www.codejock.com/support/  and ask if they are going to implement this in next version. Or use IssueTracker https://support.codejock.com/ - https://support.codejock.com/  
 
You have my vote on this
 


-------------
Product: Xtreme SuitePro (ActiveX) version 15.0.2
Platform: Windows XP (32bit) - SP 2
Language: Visual Basic 6.0

Zero replies is not an option....


Posted By: Zeus
Date Posted: 26 May 2010 at 3:09pm
thanks Aaron i will write to support


Posted By: Zeus
Date Posted: 27 May 2010 at 9:21pm
I find temporaly solution,  i make a matrix totalized and i add the total by grup with vb format, then i add to de gruopcaption the total with the format that i want :) tks i have a picture to show but i dont know how to upload the image. meaby some one need same function

Private Sub GrdInstancias_GroupOrderChangedEx(ByVal Column As XtremeReportControl.IReportColumn, ByVal Reason As XtremeReportControl.XTPReportColumnOrderChangedReason)

  Dim i As Integer
    Dim Row As ReportRow
    Dim groupRow As ReportGroupRow
    Dim xRecord As XtremeReportControl.ReportRecord
    Dim xRecordItem As XtremeReportControl.ReportRecordItem

    If Reason & xtpReportColumnAddedToGroupby Then
        For i = 0 To GrdInstancias.Rows.Count - 1
            Set Row = GrdInstancias.Rows(i)
            If Row.groupRow Then
               
                Set groupRow = Row
                    ProveedorBus = Trim(Mid(groupRow.GroupCaption, 8, 100))
                    For M = 1 To 20
                        If ProveedorBus = Trim(TotalesxProveedor(M, 1)) Then
                            TotalProveedor = Format(TotalesxProveedor(M, 2), "#,###")
                            
                        End If
                    Next M
 
                   
                    groupRow.GroupCaption = groupRow.GroupCaption & "  Gs  " & Trim(TotalProveedor)
            End If
        Next
    End If

End Sub



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