Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Report Control
  New Posts New Posts RSS Feed - Sort Not Working
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Sort Not Working

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

Joined: 18 March 2009
Location: Turkey
Status: Offline
Points: 3
Post Options Post Options   Thanks (0) Thanks(0)   Quote faithless Quote  Post ReplyReply Direct Link To This Post Topic: Sort Not Working
    Posted: 01 June 2010 at 2:44am
My init code:

                With rc1
                    .Records.DeleteAll
                    .Columns.DeleteAll
                    .Populate
                    .PreviewMode = True
                    .AutoColumnSizing = True
                    .AllowColumnSort = True
                    Set Col = AddColumn(rc1, "", 30, False, False)
                    Set Col = AddColumn(rc1, "", 30, False, False)
                    Set Col = AddColumn(rc1, "COL1", 70, False, False)
                    Col.Alignment = xtpAlignmentCenter
                    Set Col = AddColumn(rc1, "COL2", 100, False, False)
                    Set Col = AddColumn(rc1, "COL3", 125, False, False)
                    Set Col = AddColumn(rc1, "COL4", 250, True, True)
                    Set Col = AddColumn(rc1, "COL5", 300, True, True)
                    Set Col = AddColumn(rc1, "COL6", 50, False, False)
                    Col.Visible = False
                End With
For lCol = 0 To rc1.Columns.Count - 1
      rc1.Columns(lCol).Sortable = True
Next

Private Function AddColumn(ByRef p_ReportControl As ReportControl, ByVal p_Caption As String, ByVal p_MinimumWidthPx As Long, ByVal p_Resizable As Boolean, ByVal p_AutoSize As Boolean, Optional p_Sortable As Boolean = True) As ReportColumn
   ' This is a generic function for adding columns to the ReportControl
   ' It bases the starting column width on the passed miminum column width as suggested by Mark Doubson @ Codejock
   ' See http://forum.codejock.com/forum_posts.asp?TID=13379&PID=48715#48715
   ' It also ensures that the column ItemIndex is correct by basing it on the column count at the time the column is added
  
   With p_ReportControl
      Set AddColumn = .Columns.Add(.Columns.Count, p_Caption, p_MinimumWidthPx - 10, p_Resizable)
      With AddColumn
         .AutoSize = p_AutoSize
         .MinimumWidth = p_MinimumWidthPx
         .Sortable = p_Sortable
      End With
   End With
End Function


After populate of the control clicking colums headers not sort records, it shows only small arrow down or up.
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 June 2010 at 11:56am
Hi,
 
Can you upload a small test project? So I'm able to reproduce your problem?
 
Thanks
 
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
Jacob2 View Drop Down
Groupie
Groupie


Joined: 20 May 2009
Status: Offline
Points: 14
Post Options Post Options   Thanks (0) Thanks(0)   Quote Jacob2 Quote  Post ReplyReply Direct Link To This Post Posted: 30 June 2010 at 5:28am
I have same problem.

Edit: solved.

At first i used the caption property to assign text to the 'cells'. Now i'm using the value property instead and it's sorting fine.

Product: Xtreme SuitePro (ActiveX) version 13.2.0
Platform: Windows 7 (64bit)
Language: Visual Basic 6.0 / .NET 2008 / .NET 2010
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.172 seconds.