Print Page | Close Window

[SOLVED] Update a record without Populate

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=11564
Printed Date: 21 November 2024 at 10:06pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: [SOLVED] Update a record without Populate
Posted By: Aaron
Subject: [SOLVED] Update a record without Populate
Date Posted: 24 July 2008 at 9:30am
Hi,
 
Can I do this?:
 
    PhysicalMemory = GetPhysicalMemory() / 1000000
    FreePhysicalMemory = GetFreePhysicalMemory() / 1000
    
    Dim record As XtremeReportControl.ReportRecord
    Set record = wndReportControlStatus.Records(0) 
          record.Item(1).Value = PhysicalMemory & " Mb"
    wndReportControlStatus.UpdateRecord record, False
    
    Set record = wndReportControlStatus.Records(1)
          record.Item(1).Value = FreePhysicalMemory & " Mb"
    wndReportControlStatus.UpdateRecord record, False
    
    or
    
    wndReportControlStatus.Records(0).Item(1).Value = PhysicalMemory & " Mb"
    wndReportControlStatus.UpdateRecord wndReportControlStatus.Records(0), False
    wndReportControlStatus.Records(1).Item(1).Value = FreePhysicalMemory & " Mb"
    wndReportControlStatus.UpdateRecord wndReportControlStatus.Records(1), False
 
 
both will mess up the first reportitems of records
 
I will try to create a test project for this later on


-------------
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: AndreiM
Date Posted: 28 July 2008 at 11:10am
Hi,
I find a bug.
Will be fixed in 12.0.2


-------------
Regards,
Andrei Melnik


Posted By: Aaron
Date Posted: 29 July 2008 at 7:26am
Hi Andrei,
 
If you are going to fix this, will it affect the rest of ReportControl? I mean when calling .populate some (internal) collections will be destroyed (some I know, not all...)
  • Expanded/collapsed groups
  • Selected rows
  • .... maybe more

Does this .UpdateRecord method do the same or will it only be applied on that record?

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


Posted By: AndreiM
Date Posted: 29 July 2008 at 8:27am
UpdateRecord does not desroy/recreate existing collections.
Internally it calls
  RemoveRecordEx
  AddRecordEx
 
 


-------------
Regards,
Andrei Melnik


Posted By: znakeeye
Date Posted: 15 September 2008 at 5:18am
I also have problems with CXTPReportControl::UpdateRecord(), in XTP 12.0.1. After I have called it, I get a crash as soon as CXTPReportRecords::RemoveAll() is called.
 
Is this a known issue or am I doing anything wrong?
 
CMyRecord *pRecord = wndReport.GetRecords()->GetAt(0);
pRecord->DoStuff();
wndReport.UpdateRecord(pRecord, FALSE);
 
And later the report is re-populated, causing a crash:
wndReport.ResetContent();
...



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