Print Page | Close Window

Grouprow SUMSUB and alignment of sumsub

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=17265
Printed Date: 15 November 2024 at 3:54pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Grouprow SUMSUB and alignment of sumsub
Posted By: CapoPezzio
Subject: Grouprow SUMSUB and alignment of sumsub
Date 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



Replies:
Posted By: Aaron
Date 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....


Posted By: CapoPezzio
Date 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


Posted By: Aaron
Date 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....



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