Skip to content

Commit c38bd31

Browse files
committed
readme: Apply standard code formatting
1 parent 385dac6 commit c38bd31

1 file changed

Lines changed: 21 additions & 5 deletions

File tree

README.md

Lines changed: 21 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,9 @@ You can [import a report layout from a REPX file][file-example] or [load a layou
6060
6161
This example imports a report layout from the [Order.repx] file.
6262
63-
**Delphi:**
63+
<!-- start-code-block -->
64+
#### Delphi
65+
6466
```delphi
6567
AReport := TdxReport.Create(nil); // AReport: TdxReport;
6668
try
@@ -73,14 +75,17 @@ finally
7375
AReport.Free;
7476
end;
7577
```
78+
<!-- end-code-block -->
7679

7780

7881
### Step 2: Create a Database Connection
7982

8083
Create a database connection component to supply data to the report.
8184
This example uses a SQLite sample database ([nwind.db]).
8285

83-
**Delphi:**
86+
<!-- start-code-block -->
87+
#### Delphi
88+
8489
```delphi
8590
// AConnection: TdxBackendDatabaseSQLConnection;
8691
AConnection := TdxBackendDatabaseSQLConnection.Create(nil);
@@ -94,6 +99,7 @@ finally
9499
AConnection.Free;
95100
end;
96101
```
102+
<!-- end-code-block -->
97103

98104
For 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

109115
To 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
114122
AReport.Parameters['OrderIdParameter'].Value := AOrderID;
115123
```
124+
<!-- end-code-block -->
116125

117126

118127
### Step 4: Export Report Content to a File
119128

120129
This 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
124135
AStream := TMemoryStream.Create; // AStream: TMemoryStream;
125136
try
@@ -131,6 +142,8 @@ finally
131142
AStream.Free;
132143
end;
133144
```
145+
<!-- end-code-block -->
146+
134147

135148
For detailed information on available export formats, refer to the following help topic:
136149
[TdxReport.ExportTo].
@@ -142,7 +155,9 @@ using a list of parameters.
142155
You need to initialize the report layout and data connection once (steps 1 and 2)
143156
and repeat steps 3 and 4 for each parameter.
144157

145-
**Delphi:**
158+
<!-- start-code-block -->
159+
#### Delphi
160+
146161
```delphi
147162
// ...
148163
for AOrderID in AOrderIDList:
@@ -159,6 +174,7 @@ for AOrderID in AOrderIDList:
159174
end;
160175
end;
161176
```
177+
<!-- end-code-block -->
162178

163179

164180
## Files to Review

0 commit comments

Comments
 (0)