You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
### Step 5: Store the Database State Between Application Sessions
147
+
### Step 5: Persist Data between Application Sessions
153
148
154
149
This step is applicable only to the memory-based [TdxMemData] datasource.
155
150
156
-
To store the database state when user closes the application
157
-
and restore the state on app restart,
151
+
To save the dataset to a file and restore data on app restart,
158
152
handle `OnCreate` and `OnDestroy` events of the data module:
159
153
160
154
```pas
@@ -177,8 +171,8 @@ end;
177
171
178
172
## Files to Review
179
173
180
-
-[uData.pas] (Delphi) and [uData.cpp](C++Builder) store/restore layout data to/from a memory-based dataset component ([TdxMemData]).
181
-
-[uMainForm.pas] (Delphi) and [uMainForm.cpp](C++Builder) supply layout data from the data module to [TdxReport]and display Report Designer and Viewer.
174
+
-[uData.pas]/[uData.cpp]stores report layouts.
175
+
-[uMainForm.pas]/[uMainForm.cpp]creates a [TdxReport], loads report layouts from the data module, and displays Report Designer/Viewer.
182
176
-[data.dat] stores the memory-based dataset state between application sessions.
183
177
-[nwind.db] contains the Northwind sample database used as a data source for report content.
184
178
@@ -191,10 +185,10 @@ end;
191
185
-[Store report layouts in REPX files at design-time][reports-design-time-store]
192
186
- API reference:
193
187
-[TdxReport.ReportName] (internal report name that is not included in the layout)
194
-
-[TdxReport.Layout] (an XML-based layout template that can be stored in the BLOB field of a database)
195
-
-[TdxMemData] (used to store report layout data in application runtime and between sessions)
196
-
-[TDataSet] (ancestor of the [TdxMemData], contains generic database connection methods)
197
-
-[TdxBackendDatabaseSQLConnection] (used to supply data to reports)
188
+
-[TdxReport.Layout] (an XML-based layout template that can be stored in a BLOB data field)
189
+
-[TdxMemData] (a DevExpress in-memory dataset implementation)
0 commit comments