Print Page | Close Window

[DISCUSSION] Reportcontrol vs Listview

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=9554
Printed Date: 04 December 2024 at 1:18pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: [DISCUSSION] Reportcontrol vs Listview
Posted By: Aaron
Subject: [DISCUSSION] Reportcontrol vs Listview
Date Posted: 11 February 2008 at 3:48am
Hi,
 
When I looked at the sample where the reportcontrol is used in virtualmode and filling the list with lets say 1 million records in uhhh 1 second?!?! I thought wow!!!! This is what I need
 
But there's always a catch, I thought to myself. Is there? I'm currently using a listview to fill a large amount of records from a database. I don't know with which of the controls will have the best performance: Reportcontrol or Listview. Can someone tell me this? Maybe someone did a test with these controls, so a sample would be great of course, just to see the difference (in performance) between the 2 controls.
 
Thanks in advance


-------------
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....



Replies:
Posted By: sserge
Date Posted: 11 February 2008 at 4:24pm
Hi,

Note that in virtual mode you actually do not real records -- there is only 1 "virtual" record, which you can play with on various events handlers. The list is filled only with data for those records which are visible for a moment. In virtual mode there are no difference whether you have 1000 or millions records.

--
WBR,
Serge


Posted By: Aaron
Date Posted: 13 February 2008 at 1:38pm
Hi,
 
Suppose, I have a table in database which contains about 1 million records, and I want to load the data into the report control. Do I have to add one record at a time to the report control or the entire table? And afterwards I can navigate through the items?
 
Thanks in advance


Posted By: Aaron
Date Posted: 09 April 2008 at 4:44pm
Hi,
 
I did some tests with ReportControl's VirtualList. I would say this is a great control if you want to load lots of data. My app generates an event for every action and will be saved in a csv file. 
 
Loading about 1000 files (contains 1,5 million rows with 11 cols) in 16 seconds, thats about 95.000 records in one second  
Internal memory decreased about 700 Mb, minor problem these days  
 
The rows will be loaded into an array and with the BeforeDrawRow shown to the user. Then the user wants to do a search operation in the super listview and plop in 0,0001 seconds the ReportRecordItem area will be painted in a color he/she selected and this with 20 search items at one time
 
I know its only virtual but the user doesn't hahaha. Great !!!
 
The only negative about the virtual list: you cannot sort items! Or you have to do the sorting within your array but that will take more time and we don't want that
 
 
 
 


Posted By: Smucker
Date Posted: 10 April 2008 at 11:30am
You could repopulate the control when sorting, using ORDER BY on the query to the database.



-------------
Product: Xtreme Toolkit Pro version 13.2 (Unicode, static build)

Platform: Windows 200x/XP/Vista/Win7 (32/64 bit)

Language: Visual C++ 9.0 (Studio 2008)



Posted By: Aaron
Date Posted: 11 April 2008 at 4:27am
Hi,
 
I load the rows from a file (csv) into an array, not from a database. When loading the rows into a recordset its taking a lot longer. You will have sorting thats true. I will have a look at it in the near future.
 
Thanks anyway


Posted By: Lodep59
Date Posted: 11 April 2008 at 7:32am
Did you try to connect to the CSV in ADO?
 
I use the Ado CSV connector for many of my softs in vb6 and the recovery of the recordset is rather fast even for hundreds of thousand lines.
 
Once you have the recordset the order is easy.
 
In fact, I do not see what CodeJock can make to by-pass the problem. The virtual mode imposes this kind of limitations i think.


Posted By: Aaron
Date Posted: 12 April 2008 at 2:22am
Hi,
 
I knew in advance that the virtuallist couldn't be sorted, this isn't an issue. I was just explaining to my fellow CJ users how fast you can display a hugh amount of data.
 
When assigning values to an array you don't have to put so much effort in it:
 
 
fnum = FreeFile
Open strFile For Input As fnum
wholeFile = Input$(LOF(fnum), #fnum)
Close fnum
 
lines = Split(wholeFile, vbCrLf)
numberOfRows = UBound(lines)
    
totalNumberOfRows = totalNumberOfRows + numberOfRows
    For R = 0 To numberOfRows - 1
        arrayItems(R) = Split(lines(R), ",")
    next R
 
Done..... 65000 records loaded in 1 second (800Mhz machine) and ready to use for the ReportControl. The tests I did with the 1,5 million records I did in the office (3.1 Mhz and lots of memory )
 
Well if you would use a recordset things get a little slower, you have to assign a value for each field and this will take time. I tested this and it will take about 2,5 seconds MORE to fill the data (65000 records, same machine!). So loading 1,5 million records would take 60-70 seconds longer. I think you better load the records directly into the reportControl and then you will have sorting.
 
OR do you have an idea of doing this in another way, could be, I'm open to all ideas.


Posted By: younicke
Date Posted: 12 April 2008 at 7:36am
@aaron

could you possibly show us the code how you load data from a recordset?
right now im still not using the cj report control as i am still using itgrid because of very fast data loading from recordset.

statements like:
set itgrid.datasource = rs can actually load 50,000 actual records from the database in half a second

maybe this could change (i may have the chance to use the report control) if i could get to know how to load recordset into the report control.

thanks


Posted By: Aaron
Date Posted: 21 April 2008 at 7:59am
Hi,
 
For those who want the same see post
 
http://forum.codejock.com/forum_posts.asp?TID=10243 - http://forum.codejock.com/forum_posts.asp?TID=10243



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