diff --git a/README.md b/README.md index e5a7a9e..6a2582f 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ # DevExpress Reports for Delphi/C++Builder – Import and Save Report Layouts to XML Files -This example uses XML-based REPX files as [report layout][vcl-reports] storage. +This example uses XML-based REPX files as [report layout][reports-intro] storage. Run the app and execute the following actions: @@ -26,6 +26,43 @@ Run the app and execute the following actions: [req]: https://docs.devexpress.com/VCL/405773/ExpressCrossPlatformLibrary/vcl-backend/reports-dashboards-app-deployment#vcl-reportsdashboards-prerequisites +## Test the Example + +### Modify and Save the Pre-loaded Layout to a New File + +The example application loads a predefined layout at startup: [TableReport.repx]. +You can modify this preloaded report layout and save changes to a REPX file. + +1. Build and run the sample application. + Note that the app window caption displays the preloaded layout's name. +2. Click **Open Designer** to edit the loaded layout in the DevExpress + [Report Designer][designer]. + Modify the layout as you see fit. +3. Click the hamburger button, select **Save**, and close the dialog. +4. Click **Save to File** to save the report layout to a REPX file. + You can overwrite an existing file or create a new file. +5. Restart the application and click **Import from File** to import a report layout from the previously saved REPX file. +6. Click **Open Viewer** to display the imported layout in the DevExpress + [Report Viewer][viewer]. + + +### Create, Design, and Save a New Layout + +You can design a new layout from scratch and save it to a REPX file: + +1. Build and run the sample application. +2. Click **Create New** to open a new blank report layout in the DevExpress + [Report Designer][designer]. +3. Design the report layout (template) using tools available in the Report Designer. + Follow the tutorial: [Create a table report using the Report Wizard][wizard-tutorial]. +4. Click the hamburger button, select **Save**, and input a report layout name. + Click **Save** and close the dialog. +5. Click **Save to File** to save the report layout to a REPX file. +6. Restart the application and click **Import from File** to import a report layout from the previously saved REPX file. +7. Click **Open Viewer** to display the imported layout in the DevExpress + [Report Viewer][viewer]. + + ## Implementation Details ### Import a Report Layout from a File @@ -89,43 +126,6 @@ void __fastcall TMainForm::SaveReport(const String &FileName) > Internal report names are not stored in REPX files. -## Test the Example - -### Modify the Pre-loaded Layout and Save to a New File - -The example application loads a predefined layout at startup: [TableReport.repx]. -You can modify this preloaded report layout and then save changes to a REPX file. - -1. Build and run the sample application. - Note the preloaded layout's name in the application's caption. -2. Click **Open Designer** to edit the loaded layout in the DevExpress - [Report Designer][designer]. - Modify the layout as you see fit. -3. Once you have made changes in the **Report Designer** dialog, click the hamburger button, select **Save**, and close the dialog. -4. Click **Save to File** to save the report layout to a REPX file. - You can overwrite an existing file or create a new file. -5. Restart the application and click **Import from File** to import a report layout from the previously saved REPX file. -6. Click **Open Viewer** to display the imported layout in the DevExpress - [Report Viewer][viewer]. - - -### Create, Design, and Save a New Layout - -You can design a new layout from scratch and then save it to a REPX file: - -1. Build and run the sample application. -2. Click **Create New** to open a new blank report layout in the DevExpress - [Report Designer][designer]. -3. Design the report layout (template) using tools available in the **Report Designer**. - Follow the tutorial: [Create a table report using the Report Wizard][wizard-tutorial]. -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. - Click **Save** and close the dialog. -5. Click **Save to File** to save the report layout to a REPX file. -6. Restart the application and click **Import from File** to import a report layout from the previously saved REPX file. -7. Click **Open Viewer** to display the imported layout in the DevExpress - [Report Viewer][viewer]. - - ## Files to Review - [uMainForm.pas] (Delphi) and [uMainForm.cpp] (C++Builder) import and save report layouts to REPX files. @@ -137,22 +137,27 @@ You can design a new layout from scratch and then save it to a REPX file: ## Documentation -- [Introduction to VCL Reports][vcl-reports] +- [Introduction to VCL Reports][reports-intro] - [Tutorial: Create a table report using the Report Wizard][wizard-tutorial] -- [Store report layouts in REPX files at design-time](https://docs.devexpress.com/VCL/dxReport.TdxReport.Layout#string-list-editor) -- [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) +- [Use SQLite as a data source for reports (as demonstrated in the current example)][sqlite-data-source] +- [Store report layouts in REPX files at design-time][reports-design-time-store] - API reference: - - [TdxReport.Layout] + - [TdxReport.Layout] (an XML-based layout template that can be stored in a file) - [TdxReport.Layout.LoadFromFile][Layout.LoadFromFile] - [TdxReport.Layout.SaveToFile][Layout.SaveToFile] - - [TdxReport.ReportName][ReportName] - - [TdxBackendDatabaseSQLConnection] + - [TdxReport.ReportName][ReportName] (internal report name that is not included in the layout) + - [TdxBackendDatabaseSQLConnection] (supplies data to reports) -[vcl-reports]: https://docs.devexpress.com/VCL/405469/ExpressReports/vcl-reports + + +[reports-intro]: https://docs.devexpress.com/VCL/405469/ExpressReports/vcl-reports [designer]: https://docs.devexpress.com/XtraReports/119176/web-reporting/web-end-user-report-designer [viewer]: https://docs.devexpress.com/XtraReports/401850/web-reporting/web-document-viewer [wizard-tutorial]: https://docs.devexpress.com/VCL/405760/ExpressReports/getting-started/create-table-report-using-report-wizard +[sqlite-data-source]: https://docs.devexpress.com/VCL/405750/ExpressCrossPlatformLibrary/vcl-backend/database-engines/vcl-backend-sqlite-support +[reports-design-time-store]: https://docs.devexpress.com/VCL/dxReport.TdxReport.Layout#string-list-editor + [TdxReport.Layout]: https://docs.devexpress.com/VCL/dxReport.TdxReport.Layout [Layout.LoadFromFile]: https://docwiki.embarcadero.com/Libraries/Athens/en/System.Classes.TStrings.LoadFromFile [Layout.SaveToFile]: https://docwiki.embarcadero.com/Libraries/Athens/en/System.Classes.TStrings.SaveToFile @@ -161,8 +166,16 @@ You can design a new layout from scratch and then save it to a REPX file: ## More Examples -- [Store DevExpress VCL Report Layouts in a Database](https://github.com/DevExpress-Examples/vcl-reports-store-layout-template-database) -- [Localize the DevExpress VCL Report Viewer and Report Designer UI](https://github.com/DevExpress-Examples/vcl-reports-localize) +- [Store report layouts in a database][database-example] +- [Filter data records in a report][filter-data-records] +- [Generate reports in a backend / service application][non-interactive-export] +- [Localize the Report Viewer and Report Designer UI][localize] + + +[database-example]: https://github.com/DevExpress-Examples/vcl-reports-store-layout-template-database +[filter-data-records]: https://github.com/DevExpress-Examples/vcl-filter-report-preview-based-on-grid-selected-rows +[non-interactive-export]: https://github.com/DevExpress-Examples/vcl-reports-non-interactive-export +[localize]: https://github.com/DevExpress-Examples/vcl-reports-localize ## Does This Example Address Your Development Requirements/Objectives? @@ -171,3 +184,5 @@ You can design a new layout from scratch and then save it to a REPX file: (you will be redirected to DevExpress.com to submit your response) + +