Skip to content

Commit 246f1b2

Browse files
committed
readme: Add example and reference links
- Refactor the links structure to simplify maintenance. - Bring the file and code entity links to the DevExpress standard.
1 parent 9799d74 commit 246f1b2

1 file changed

Lines changed: 49 additions & 23 deletions

File tree

README.md

Lines changed: 49 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55
[![](https://img.shields.io/badge/💬_Leave_Feedback-feecdd?style=flat-square)](#does-this-example-address-your-development-requirementsobjectives)
66
<!-- default badges end -->
77

8-
# DevExpress&nbsp;VCL&nbsp;Reports&nbsp;– Import&nbsp;and&nbsp;Save Report&nbsp;Layouts to XML&nbsp;Files
8+
# DevExpress Reports for Delphi/C++Builder – Import and Save Report Layouts to XML Files
99

10-
This example uses XML-based REPX files as [report layout](https://docs.devexpress.com/VCL/405469/ExpressReports/vcl-reports) storage.
10+
This example uses XML-based REPX files as [report layout][vcl-reports] storage.
1111

1212
Run the app and execute the following actions:
1313

@@ -20,17 +20,17 @@ Run the app and execute the following actions:
2020

2121
## Prerequisites
2222

23-
[DevExpress Reports Prerequisites](https://docs.devexpress.com/VCL/405773/ExpressCrossPlatformLibrary/vcl-backend/reports-dashboards-app-deployment#vcl-reportsdashboards-prerequisites)
23+
[DevExpress Reports Prerequisites][req]
24+
25+
[req]: https://docs.devexpress.com/VCL/405773/ExpressCrossPlatformLibrary/vcl-backend/reports-dashboards-app-deployment#vcl-reportsdashboards-prerequisites
2426

2527

2628
## Implementation Details
2729

2830
### Import a Report Layout from a File
2931

30-
To import (load) a report layout from a file, call the
31-
[`Layout.LoadFromFile`](https://docwiki.embarcadero.com/Libraries/Athens/en/System.Classes.TStrings.LoadFromFile)
32-
method and assign a name to the
33-
[`ReportName`](https://docs.devexpress.com/VCL/dxReport.TdxReport.ReportName) property:
32+
To import (load) a report layout from a file, call the [Layout.LoadFromFile]
33+
method and assign a name to the [ReportName] property:
3434

3535
<!-- start-code-block -->
3636
#### Delphi
@@ -62,8 +62,7 @@ void __fastcall TMainForm::ImportReport(const String &FileName)
6262
6363
### Save a Report Layout to a File
6464
65-
To save the current report layout to a file, call the
66-
[`Layout.SaveToFile`](https://docwiki.embarcadero.com/Libraries/Athens/en/System.Classes.TStrings.SaveToFile) method:
65+
To save the current report layout to a file, call the [Layout.SaveToFile] method:
6766
6867
<!-- start-code-block -->
6968
#### Delphi
@@ -93,20 +92,20 @@ void __fastcall TMainForm::SaveReport(const String &FileName)
9392
9493
### Modify the Pre-loaded Layout and Save to a New File
9594
96-
The example application loads a predefined layout at startup: `TableReport.repx`.
95+
The example application loads a predefined layout at startup: [TableReport.repx].
9796
You can modify this preloaded report layout and then save changes to a REPX file.
9897
9998
1. Build and run the sample application.
10099
Note the preloaded layout's name in the application's caption.
101100
2. Click **Open Designer** to edit the loaded layout in the DevExpress
102-
[Report Designer](https://docs.devexpress.com/XtraReports/119176/web-reporting/web-end-user-report-designer).
101+
[Report Designer][designer].
103102
Modify the layout as you see fit.
104103
3. Once you have made changes in the **Report Designer** dialog, click the hamburger button, select **Save**, and close the dialog.
105104
4. Click **Save to File** to save the report layout to a REPX file.
106105
You can overwrite an existing file or create a new file.
107106
5. Restart the application and click **Import from File** to import a report layout from the previously saved REPX file.
108107
6. Click **Open Viewer** to display the imported layout in the DevExpress
109-
[Report Viewer](https://docs.devexpress.com/XtraReports/401850/web-reporting/web-document-viewer).
108+
[Report Viewer][viewer].
110109
111110
112111
### Create, Design, and Save a New Layout
@@ -115,27 +114,54 @@ You can design a new layout from scratch and then save it to a REPX file:
115114
116115
1. Build and run the sample application.
117116
2. Click **Create New** to open a new blank report layout in the DevExpress
118-
[Report Designer](https://docs.devexpress.com/XtraReports/119176/web-reporting/web-end-user-report-designer).
117+
[Report Designer][designer].
119118
3. Design the report layout (template) using tools available in the **Report Designer**.
120-
Follow the tutorial: [Create a table report using the Report Wizard](https://docs.devexpress.com/VCL/405760/ExpressReports/getting-started/create-table-report-using-report-wizard).
119+
Follow the tutorial: [Create a table report using the Report Wizard][wizard-tutorial].
121120
4. Once you have made all necessary changes in the **Report Designer** dialog, click the hamburger button, select **Save**, and enter a report layout name.
122121
Click **Save** and close the dialog.
123122
5. Click **Save to File** to save the report layout to a REPX file.
124123
6. Restart the application and click **Import from File** to import a report layout from the previously saved REPX file.
125124
7. Click **Open Viewer** to display the imported layout in the DevExpress
126-
[Report Viewer](https://docs.devexpress.com/XtraReports/401850/web-reporting/web-document-viewer).
125+
[Report Viewer][viewer].
126+
127+
128+
## Files to Review
129+
130+
- [uMainForm.pas] (Delphi) and [uMainForm.cpp] (C++Builder) import and save report layouts to REPX files.
131+
- [TableReport.repx] contains a report layout designed to generate a customer order report.
132+
133+
[uMainForm.pas]: ./Delphi/uMainForm.pas
134+
[uMainForm.cpp]: ./CPB/uMainForm.cpp
135+
[TableReport.repx]: ./Table%20Report.repx
136+
137+
## Documentation
138+
139+
- [Introduction to VCL Reports][vcl-reports]
140+
- [Tutorial: Create a table report using the Report Wizard][wizard-tutorial]
141+
- [Store report layouts in REPX files at design-time](https://docs.devexpress.com/VCL/dxReport.TdxReport.Layout#string-list-editor)
142+
- [Use SQLite as a data source for reports (as demonstrated in the current example)](https://docs.devexpress.com/VCL/405750/ExpressCrossPlatformLibrary/vcl-backend/database-engines/vcl-backend-sqlite-support)
143+
- API reference:
144+
- [TdxReport.Layout]
145+
- [TdxReport.Layout.LoadFromFile][Layout.LoadFromFile]
146+
- [TdxReport.Layout.SaveToFile][Layout.SaveToFile]
147+
- [TdxReport.ReportName][ReportName]
148+
- [TdxBackendDatabaseSQLConnection]
127149
150+
[vcl-reports]: https://docs.devexpress.com/VCL/405469/ExpressReports/vcl-reports
151+
[designer]: https://docs.devexpress.com/XtraReports/119176/web-reporting/web-end-user-report-designer
152+
[viewer]: https://docs.devexpress.com/XtraReports/401850/web-reporting/web-document-viewer
153+
[wizard-tutorial]: https://docs.devexpress.com/VCL/405760/ExpressReports/getting-started/create-table-report-using-report-wizard
128154
129-
## Documentation and Examples
155+
[TdxReport.Layout]: https://docs.devexpress.com/VCL/dxReport.TdxReport.Layout
156+
[Layout.LoadFromFile]: https://docwiki.embarcadero.com/Libraries/Athens/en/System.Classes.TStrings.LoadFromFile
157+
[Layout.SaveToFile]: https://docwiki.embarcadero.com/Libraries/Athens/en/System.Classes.TStrings.SaveToFile
158+
[ReportName]: https://docs.devexpress.com/VCL/dxReport.TdxReport.ReportName
159+
[TdxBackendDatabaseSQLConnection]: https://docs.devexpress.com/VCL/dxBackend.ConnectionString.SQL.TdxBackendDatabaseSQLConnection
130160
131-
- [Introduction to VCL Reports](https://docs.devexpress.com/VCL/405469/ExpressReports/vcl-reports)
132-
- [Tutorial: Create a table report using the Report Wizard](https://docs.devexpress.com/VCL/405760/ExpressReports/getting-started/create-table-report-using-report-wizard)
133-
- [How to store report layouts in REPX files at design-time](https://docs.devexpress.com/VCL/dxReport.TdxReport.Layout#string-list-editor)
134-
- [How to store report layouts in a database (example application)](https://github.com/DevExpress-Examples/vcl-reports-store-layout-template-database)
135-
- [How to use SQLite as a data source for reports (as demonstrated in the current example)](https://docs.devexpress.com/VCL/405750/ExpressCrossPlatformLibrary/vcl-backend/database-engines/vcl-backend-sqlite-support)
136-
- [API reference: `TdxReport.Layout` Property](https://docs.devexpress.com/VCL/dxReport.TdxReport.Layout)
137-
- [API reference: `TdxBackendDatabaseSQLConnection` Component](https://docs.devexpress.com/VCL/dxBackend.ConnectionString.SQL.TdxBackendDatabaseSQLConnection)
161+
## More Examples
138162
163+
- [Store DevExpress VCL Report Layouts in a Database](https://github.com/DevExpress-Examples/vcl-reports-store-layout-template-database)
164+
- [Localize the DevExpress VCL Report Viewer and Report Designer UI](https://github.com/DevExpress-Examples/vcl-reports-localize)
139165
140166
<!-- feedback -->
141167
## Does This Example Address Your Development Requirements/Objectives?

0 commit comments

Comments
 (0)