@@ -60,7 +60,9 @@ You can [import a report layout from a REPX file][file-example] or [load a layou
6060
6161This example imports a report layout from the [Order.repx] file.
6262
63- **Delphi:**
63+ <!-- start-code-block -->
64+ #### Delphi
65+
6466```delphi
6567AReport := TdxReport.Create(nil); // AReport: TdxReport;
6668try
@@ -73,14 +75,17 @@ finally
7375 AReport.Free;
7476end;
7577```
78+ <!-- end-code-block -->
7679
7780
7881### Step 2: Create a Database Connection
7982
8083Create a database connection component to supply data to the report.
8184This example uses a SQLite sample database ([ nwind.db] ).
8285
83- ** Delphi:**
86+ <!-- start-code-block -->
87+ #### Delphi
88+
8489``` delphi
8590// AConnection: TdxBackendDatabaseSQLConnection;
8691AConnection := TdxBackendDatabaseSQLConnection.Create(nil);
@@ -94,6 +99,7 @@ finally
9499 AConnection.Free;
95100end;
96101```
102+ <!-- end-code-block -->
97103
98104For detailed information on data source management and supported database engines, refer to the following help topic:
99105[ VCL Backend: Supported Database Systems] [ supported-dbms ] .
@@ -108,18 +114,23 @@ For example, [Order.repx] includes a single `OrderIDParameter` that filters data
108114
109115To modify parameters, assign values to [ TdxReport.Parameters] list members as follows:
110116
111- ** Delphi:**
117+ <!-- start-code-block -->
118+ #### Delphi
119+
112120``` delphi
113121// Set the "OrderIdParameter" value in the report layout
114122AReport.Parameters['OrderIdParameter'].Value := AOrderID;
115123```
124+ <!-- end-code-block -->
116125
117126
118127### Step 4: Export Report Content to a File
119128
120129This example exports a report to a PDF file using the [ TdxReport.ExportToPDF] method:
121130
122- ** Delphi:**
131+ <!-- start-code-block -->
132+ #### Delphi
133+
123134``` delphi
124135AStream := TMemoryStream.Create; // AStream: TMemoryStream;
125136try
@@ -131,6 +142,8 @@ finally
131142 AStream.Free;
132143end;
133144```
145+ <!-- end-code-block -->
146+
134147
135148For detailed information on available export formats, refer to the following help topic:
136149[ TdxReport.ExportTo] .
@@ -142,7 +155,9 @@ using a list of parameters.
142155You need to initialize the report layout and data connection once (steps 1 and 2)
143156and repeat steps 3 and 4 for each parameter.
144157
145- ** Delphi:**
158+ <!-- start-code-block -->
159+ #### Delphi
160+
146161``` delphi
147162// ...
148163for AOrderID in AOrderIDList:
@@ -159,6 +174,7 @@ for AOrderID in AOrderIDList:
159174 end;
160175end;
161176```
177+ <!-- end-code-block -->
162178
163179
164180## Files to Review
0 commit comments