Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Report Control
  New Posts New Posts RSS Feed - Grouprow SUMSUB and alignment of sumsub
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Grouprow SUMSUB and alignment of sumsub

 Post Reply Post Reply
Author
Message
CapoPezzio View Drop Down
Groupie
Groupie


Joined: 13 April 2010
Status: Offline
Points: 25
Post Options Post Options   Thanks (0) Thanks(0)   Quote CapoPezzio Quote  Post ReplyReply Direct Link To This Post Topic: Grouprow SUMSUB and alignment of sumsub
    Posted: 17 September 2010 at 8:54am
Hi.

I have a reportcontrol wich I use SUMSUB to show groupsums when I am grouping on a column. This works fine, but the alignment of the groupsum does not follow the allignment of the columns i use Sumsub on



Here is my sumsub code:

Private Sub RC_GroupOrderChangedEx(ByVal Column As XtremeReportControl.IReportColumn, ByVal Reason As XtremeReportControl.XTPReportColumnOrderChangedReason)
   
    If Reason & xtpReportColumnAddedToGroupby Then
        For i = 0 To RC.Rows.Count - 1
            Set Row = RC.Rows(i)
            If Row.groupRow Then
                Set groupRow = Row
                    groupRow.GroupFormat = "%.02f"
                    tformel = ""
                    For j = 1 To m_sums.Rows
                        tformel = tformel & " SUMSUB(C" & m_sums.value(3, j) - 1 & ":C" & m_sums.value(3, j) & ")"
                    Next
                    groupRow.GroupFormula = Trim(tformel)
                    'groupRow.GroupFormula = "SUMSUB(C2:C3) SUMSUB(C3:C4)"
                    groupRow.GroupCaption = "x"
            End If
        Next
        RC.ReCalc True
        RC.ReDraw
    End If
End Sub

Anyone got an idea how I can right-align the sums in the grouping-row?




Product: Xtreme SuitePro (ActiveX) version 13.3.1
Platform: Windows 7 (32bit)
Language: Visual Basic 6.0
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: 21 September 2010 at 4:21am
Hi,
 
Did you set .HeaderAlignment and .Alignment same?
 
With Me.wndReportControl
        With .Columns
            With .Add(.Count, "Col 1", 100, True)
                .HeaderAlignment = xtpAlignmentRight
                .Alignment = xtpAlignmentRight
            End With  
        End With
End With
 
Hope this helps Wink
 
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
CapoPezzio View Drop Down
Groupie
Groupie


Joined: 13 April 2010
Status: Offline
Points: 25
Post Options Post Options   Thanks (0) Thanks(0)   Quote CapoPezzio Quote  Post ReplyReply Direct Link To This Post Posted: 21 September 2010 at 4:43am
Thanks for always replying AaronSmile. I do set the .Headeralignment and .Alignment same.
I am using databind.
wndReportControl.Datasouce = myDataSet
wndReportControl.Databind

Then I go through the columns and set the Alignment

 For Each c In wndReportControl.Columns
            c.Alignment = theAlignment_I_want  'xtpAlignmentCenter, xtpAlignmentRight or xtpAlignmentLeft
            c.HeaderAlignment = c.Alignment
            c.FooterAlignment = c.Alignment

  Next

Any other idea?
Product: Xtreme SuitePro (ActiveX) version 13.3.1
Platform: Windows 7 (32bit)
Language: Visual Basic 6.0
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: 04 October 2010 at 2:19pm
Hi,
 
I'm sorry but I didn't see your reply Embarrassed
 
I tried with CodeJock sample and I'm able to set .Alignment & .HeaderAlignment afterwards (DataBinding sample) and I tried with my own code and (sub)totals use these settings...
 
Is it possible to upload small test project?
 
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
 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.188 seconds.