Print Page | Close Window

Problem Sorting Column in Virtual Mode

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=16630
Printed Date: 05 October 2024 at 1:16am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Problem Sorting Column in Virtual Mode
Posted By: Setiawan
Subject: Problem Sorting Column in Virtual Mode
Date 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)
 
 



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


Posted By: Setiawan
Date Posted: 27 April 2010 at 12:29pm
Thanks fo your response. I will try ...



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