diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..9db2045 --- /dev/null +++ b/.gitignore @@ -0,0 +1,88 @@ +# Default Delphi compiler directories +# Content of this directories are generated with each Compile/Construct of a project. +Win32/ +Win64/ +Win64x/ + +# Delphi compiler-generated binaries (safe to delete) +*.exe +*.dll +*.bpl +*.bpi +*.dcp +*.so +*.apk +*.drc +*.map +*.dres +*.rsm +*.tds +*.dcu +*.lib +*.a +*.o +*.ocx + +# Delphi autogenerated files (duplicated info) +*.cfg +*.hpp +*Resource.rc +*.rsp + +# Delphi local files (user-specific info) +*.local +*.identcache +*.projdata +*.tvsconfig +*.dsk +*.dsv + +# Delphi history and backups +__history/ +__recovery/ +*.~* + + +# ------------------------------------------------------------ +# C++Builder specific +# ------------------------------------------------------------ + +# C++Builder compiler outputs +*.obj +*.hpp +*.ilc +*.ild +*.ilf +*.ils +*.map +*.tds + +# Precompiled headers +*.pch + +# C++Builder packages and libraries +*.bpl +*.bpi +*.lib +*.a +*.dll +*.so + +# C++Builder intermediate / cache files +*.cbproj.local +*.cbproj.identcache +*.cbproj.user +*.cbtemp + + +# Castalia statistics file (since XE7 Castalia is distributed with Delphi) +*.stat + +# Boss dependency manager vendor folder https://github.com/HashLoad/boss +modules/ + +# Output files +*.pdf +*.docx +*.zip +data.dat diff --git a/CPB/uMainForm.dfm b/CPB/uMainForm.dfm index 68e9f56..df92d89 100644 --- a/CPB/uMainForm.dfm +++ b/CPB/uMainForm.dfm @@ -25,7 +25,6 @@ object MainForm: TMainForm Width = 377 Height = 25 Caption = 'Design Report' - SpeedButtonOptions.CanBeFocused = False TabOrder = 1 OnClick = btnDesignClick end diff --git a/Delphi/ReportTemplate.res b/Delphi/ReportTemplate.res new file mode 100644 index 0000000..13ca832 Binary files /dev/null and b/Delphi/ReportTemplate.res differ diff --git a/Delphi/uMainForm.dfm b/Delphi/uMainForm.dfm index 6945cc4..e18245c 100644 --- a/Delphi/uMainForm.dfm +++ b/Delphi/uMainForm.dfm @@ -25,7 +25,6 @@ object MainForm: TMainForm Width = 377 Height = 25 Caption = 'Design Report' - SpeedButtonOptions.CanBeFocused = False TabOrder = 1 OnClick = btnDesignClick end diff --git a/README.md b/README.md index fbc8dca..162252a 100644 --- a/README.md +++ b/README.md @@ -4,23 +4,64 @@ [![](https://img.shields.io/badge/📖_How_to_use_DevExpress_Examples-e9f6fc?style=flat-square)](https://docs.devexpress.com/GeneralInformation/403183) [![](https://img.shields.io/badge/💬_Leave_Feedback-feecdd?style=flat-square)](#does-this-example-address-your-development-requirementsobjectives) -# DevExpress VCL Reports - Store Report Layouts in a Database -This example stores a [report layout](https://docs.devexpress.com/VCL/dxReport.TdxReport.Layout) (XML-based template) in the BLOB field of a memory-based dataset ([TdxMemData](https://docs.devexpress.com/VCL/dxmdaset.TdxMemData) inherited from the [TDataSet](https://docwiki.embarcadero.com/Libraries/Athens/en/Data.DB.TDataSet) class shipped with the standard VCL library). +# DevExpress Reports for Delphi/C++Builder – Store Report Layouts in a Database -## Testing the example +This example application stores [DevExpress report layouts][TdxReport.Layout] in a database. +The application allows users to create and save report layouts, modify existing layouts, and open layouts in Report Designer/Viewer. + + +The example uses a memory-based dataset as the database used to store layouts. +The dataset is based on the [TdxMemData] component from the DevExpress library, +inherited from the [TDataSet] class shipped with the standard VCL library. + +## Test the Example * Run the sample app and click **New Report** to create an empty database record. -* Click **Show Designer** to display the [Report Designer](https://docs.devexpress.com/XtraReports/119176/web-reporting/web-end-user-report-designer) dialog. +* Click **Show Designer** to display the [Report Designer][dx-report-designer] dialog. * Create a report layout using tools available within the UI. * Click the hamburger button, select the **Save** option, and close the dialog. -* Close the app. The [TdxMemData](https://docs.devexpress.com/VCL/dxmdaset.TdxMemData) component will store layout data between sessions. -* Run the sample app again. Click **View Designer** to load the saved report layout, or **View Report** to preview a layout-based report in the [Report Viewer](https://docs.devexpress.com/XtraReports/401850/web-reporting/web-document-viewer) dialog. +* Close the app. The [TdxMemData] component will store layout data between sessions. +* Run the sample app again. Click **View Designer** to load the saved report layout, or **View Report** to preview a layout-based report in the [Report Viewer][dx-report-viewer] dialog. ## Documentation -* [TdxReport.Layout Property](https://docs.devexpress.com/VCL/dxReport.TdxReport.Layout) -* [TdxBackendDataSetJSONConnection Component](https://docs.devexpress.com/VCL/dxBackend.ConnectionString.JSON.DataSet.TdxBackendDataSetJSONConnection) +- [Introduction to VCL Reports][reports-intro] +- [Tutorial: Create a table report using the Report Wizard][report-wizard] +- [Store report layouts in REPX files at design-time][reports-design-time-store] + +- [Use SQLite as a data source for reports (as demonstrated in the current example)][sqlite-data-source] +- API reference: + - [TdxReport.Layout] + - [TdxBackendDatabaseSQLConnection] (used to supply data to reports in the current example) + - [TdxBackendDataSetJSONConnection] (used to store report layouts in the current example) + - [TdxMemData] (used to store layout data between sessions) + + +[reports-intro]: https://docs.devexpress.com/VCL/405469/ExpressReports/vcl-reports +[report-wizard]: https://docs.devexpress.com/VCL/405760/ExpressReports/getting-started/create-table-report-using-report-wizard +[reports-design-time-store]: https://docs.devexpress.com/VCL/dxReport.TdxReport.Layout#string-list-editor +[sqlite-data-source]: https://docs.devexpress.com/VCL/405750/ExpressCrossPlatformLibrary/vcl-backend/database-engines/vcl-backend-sqlite-support +[dx-report-viewer]: https://docs.devexpress.com/XtraReports/401850/web-reporting/web-document-viewer +[dx-report-designer]: https://docs.devexpress.com/XtraReports/119176/web-reporting/web-end-user-report-designer + + + +[TdxReport.Layout]: https://docs.devexpress.com/VCL/dxReport.TdxReport.Layout +[TdxBackendDatabaseSQLConnection]: https://docs.devexpress.com/VCL/dxBackend.ConnectionString.SQL.TdxBackendDatabaseSQLConnection +[TdxBackendDataSetJSONConnection]: https://docs.devexpress.com/VCL/dxBackend.ConnectionString.JSON.DataSet.TdxBackendDataSetJSONConnection +[TdxMemData]: https://docs.devexpress.com/VCL/dxmdaset.TdxMemData +[TDataSet]: https://docwiki.embarcadero.com/Libraries/Athens/en/Data.DB.TDataSet + + + + +## More Examples + +- [Store report layouts in REPX files (example application)][file-example] + +[file-example]: https://github.com/DevExpress-Examples/vcl-reports-store-layout-template-file + ## Does This Example Address Your Development Requirements/Objectives? @@ -31,3 +72,5 @@ This example stores a [report layout](https://docs.devexpress.com/VCL/dxReport.T + +