FlexCel Studio for VCL/LCL
ContentsIndex
PreviousUpNext
TFlxMemTable Class

An In-Memory table you can use as a source to TFlexCelReport.

Pascal
TFlxMemTable = class(TComponent, IUnknown, IXlsDataSet);
C++
class TFlxMemTable : public TComponent, public IUnknown, public IXlsDataSet;

Use FlxMemTable to pass memory data to a TFlexCelReport component. If you are not using Databases, or if you need to pass to Excel some special memory data that is not stored into the database, you can use this component as a proxy between your classes and FlexCelReport. 

 

FlxMemTable behaves as a normal dataset in FlexCel, but it doesn't include any DB overhead. You can use it the same way you would use a normal dataset, including using it as a PagesDataSet. 

 

This component can work in two ways: Normal mode and Virtual mode. 

In normal mode you fill the database manually, by calling the AddRecord method. This method is best for small datasets since it is simpler to setup and also easier to use in Master.Detail. But if you have much data that you don't want to duplicate, you should use Virtual mode. 

 

In virtual mode, you set the values on the OnVirtualRecordCount and OnGetData events, so you don't need two copies of your data. No extra data is stored. Whenever you set any of those two events, the TFlxMemTable goes automatically to Virtual mode. So if you want to bring back a table to normal mode, make sure you delete those events. 

 

NOTE: If you are using any other memory table in your application (like a TClientDataSet) you might find easier to use those tables instead of a TFlxMemoryTable in normal mode. But you will still need TFlxMemTable in virtual to send non-dataset data (like a TList) to a report without filling a temporary memory table.  

Copyright (c) 2002-2008 TMS Software. All rights reserved.
What do you think about this topic? Send feedback!