Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Report Control
  New Posts New Posts RSS Feed - [DISCUSSION] Reportcontrol vs Listview
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

[DISCUSSION] Reportcontrol vs Listview

 Post Reply Post Reply
Author
Message
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 Topic: [DISCUSSION] Reportcontrol vs Listview
    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....
Back to Top
sserge View Drop Down
Moderator Group
Moderator Group


Joined: 01 December 2004
Status: Offline
Points: 1297
Post Options Post Options   Thanks (0) Thanks(0)   Quote sserge Quote  Post ReplyReply Direct Link To This Post 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
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: 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
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: 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
 
 
 
 
Back to Top
Smucker View Drop Down
Senior Member
Senior Member
Avatar

Joined: 02 February 2008
Status: Offline
Points: 156
Post Options Post Options   Thanks (0) Thanks(0)   Quote Smucker Quote  Post ReplyReply Direct Link To This Post 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)

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: 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
Back to Top
Lodep59 View Drop Down
Senior Member
Senior Member
Avatar

Joined: 03 April 2008
Status: Offline
Points: 203
Post Options Post Options   Thanks (0) Thanks(0)   Quote Lodep59 Quote  Post ReplyReply Direct Link To This Post 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.
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: 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.
Back to Top
younicke View Drop Down
Senior Member
Senior Member
Avatar

Joined: 11 March 2005
Status: Offline
Points: 107
Post Options Post Options   Thanks (0) Thanks(0)   Quote younicke Quote  Post ReplyReply Direct Link To This Post 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
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: 21 April 2008 at 7:59am
Hi,
 
For those who want the same see post
 
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.250 seconds.