Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Report Control
  New Posts New Posts RSS Feed - Problem Sorting Column in Virtual Mode
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Problem Sorting Column in Virtual Mode

 Post Reply Post Reply
Author
Message
Setiawan View Drop Down
Newbie
Newbie


Joined: 26 April 2007
Status: Offline
Points: 7
Post Options Post Options   Thanks (0) Thanks(0)   Quote Setiawan Quote  Post ReplyReply Direct Link To This Post Topic: Problem Sorting Column in Virtual Mode
    Posted: 25 April 2010 at 12:49pm
I'm having trouble using CJ ReportControl with Virtual Mode. I have 15.000 records stored internally in multidimensional Array. I'm using VirtualMode to display all record ( amazing speed).  But when I click on a column the sorting didn't work. Anyone can help me?
 
I'm using VB 6.0 and CJ ActiveX 13.3.1 Thanks before ...
 
Illustration
 
Form Load :
 
Dim Column As ReportColumn
 
Set Column = wndReportControl.Columns.Add(0, "Column 1", 50, True) ' Number
Set Column = wndReportControl.Columns.Add(1, "Column 2", 100, True) ' String
Set Column = wndReportControl.Columns.Add(2, "Column 3", 100, True) ' Date
Set Column = wndReportControl.Columns.Add(3, "Column 4", 100, True) ' String
Set Column = wndReportControl.Columns.Add(4, "Column 5", 200, True) ' String
 
Command Bar (Load Data)  :
 
ReDim dimension(0 To TotalRecord, 4)
...
....
 
wndReportControl.SetVirtualMode TotalRecord, 5
wndReportControl.Populate
wndReportControl.SetCustomDraw xtpCustomBeforeDrawRow
 
wndReportControl_BeforeDrawRow
 
Dim RowIndex As Long
RowIndex = row.Index
Metrics.Text = dimensi(RowIndex, Item.Index)
 
 
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 April 2010 at 12:19pm
Hi,
 
Your "trouble" is what we all wish to have with virtual report...  
 
The case is that you can't have:
  1. Sorting
  2. Grouping

in virtual mode. The only thing you do have is: SPEED and some nice options to change contents of ReportItem in BeforeDrawRow event.

If you want sorting you have to do it yourself... You could sort your array (clicking column and BeforeDrawRow event will take care of the rest) or load array into a recordset and create SQL string to sort recordset. There are lot of options but not with ReportControl itself.
 
Try to search forum with virtualmode, there are a lot of samples and discussions
See also Samples subforum
 
 
 
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
Setiawan View Drop Down
Newbie
Newbie


Joined: 26 April 2007
Status: Offline
Points: 7
Post Options Post Options   Thanks (0) Thanks(0)   Quote Setiawan Quote  Post ReplyReply Direct Link To This Post Posted: 27 April 2010 at 12:29pm
Thanks fo your response. I will try ...
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.125 seconds.