Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Report Control
  New Posts New Posts RSS Feed - Formating Sum Result in group formula
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Formating Sum Result in group formula

 Post Reply Post Reply
Author
Message
Zeus View Drop Down
Newbie
Newbie
Avatar

Joined: 05 November 2008
Status: Offline
Points: 5
Post Options Post Options   Thanks (0) Thanks(0)   Quote Zeus Quote  Post ReplyReply Direct Link To This Post Topic: Formating Sum Result in group formula
    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


Back to Top
Aaron View Drop Down
Senior Member
Senior Member
Avatar

Joined: 29 January 2008
Status: Offline
Points: 2192
Post Options Post Options   Thanks (0) Thanks(0)   Quote Aaron Quote  Post ReplyReply Direct Link To This Post 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....
Back to Top
Zeus View Drop Down
Newbie
Newbie
Avatar

Joined: 05 November 2008
Status: Offline
Points: 5
Post Options Post Options   Thanks (0) Thanks(0)   Quote Zeus Quote  Post ReplyReply Direct Link To This Post Posted: 25 May 2010 at 6:42pm
hi Aaron tks for the reply how i do that? i confussed
Back to Top
Aaron View Drop Down
Senior Member
Senior Member
Avatar

Joined: 29 January 2008
Status: Offline
Points: 2192
Post Options Post Options   Thanks (0) Thanks(0)   Quote Aaron Quote  Post ReplyReply Direct Link To This Post 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/ and ask if they are going to implement this in next version. Or use IssueTracker 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....
Back to Top
Zeus View Drop Down
Newbie
Newbie
Avatar

Joined: 05 November 2008
Status: Offline
Points: 5
Post Options Post Options   Thanks (0) Thanks(0)   Quote Zeus Quote  Post ReplyReply Direct Link To This Post Posted: 26 May 2010 at 3:09pm
thanks Aaron i will write to support
Back to Top
Zeus View Drop Down
Newbie
Newbie
Avatar

Joined: 05 November 2008
Status: Offline
Points: 5
Post Options Post Options   Thanks (0) Thanks(0)   Quote Zeus Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.203 seconds.