diff --git a/.gitignore b/.gitignore index 9db64f6..941fd82 100644 --- a/.gitignore +++ b/.gitignore @@ -1,45 +1,12 @@ -# Uncomment these types if you want even more clean repository. But be careful. -# It can make harm to an existing project source. Read explanations below. -# -# Resource files are binaries containing manifest, project icon and version info. -# They can not be viewed as text or compared by diff-tools. Consider replacing them with .rc files. -#*.res -# -# Type library file (binary). In old Delphi versions it should be stored. -# Since Delphi 2009 it is produced from .ridl file and can safely be ignored. -#*.tlb -# -# Diagram Portfolio file. Used by the diagram editor up to Delphi 7. -# Uncomment this if you are not using diagrams or use newer Delphi version. -#*.ddp -# -# Visual LiveBindings file. Added in Delphi XE2. -# Uncomment this if you are not using LiveBindings Designer. -#*.vlb -# -# Deployment Manager configuration file for your project. Added in Delphi XE2. -# Uncomment this if it is not mobile development and you do not use remote debug feature. -#*.deployproj -# -# C++ object files produced when C/C++ Output file generation is configured. -# Uncomment this if you are not using external objects (zlib library for example). -#*.obj -# - # Default Delphi compiler directories -# Content of this directories are generated with each Compile/Construct of a project. -# Most of the time, files here have not there place in a code repository. -#Win32/ -#Win64/ -#OSX64/ -#OSXARM64/ -#Android/ -#Android64/ -#iOSDevice64/ -#Linux64/ +# Content of these directories are generated with each Compile/Construct of a project. +Win32/ +Win64/ +Win64x/ # Delphi compiler-generated binaries (safe to delete) *.exe +*.exe.* *.dll *.bpl *.bpi @@ -61,6 +28,7 @@ *.cfg *.hpp *Resource.rc +*.rsp # Delphi local files (user-specific info) *.local @@ -75,8 +43,50 @@ __history/ __recovery/ *.~* + +# ------------------------------------------------------------ +# C++Builder specific +# ------------------------------------------------------------ + +# C++Builder compiler outputs +*.obj +*.hpp +*.ilc +*.ild +*.ilf +*.ils +*.map +*.tds +# Program Database file that stores debugging symbols +*.pdb + + +# 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/README.md b/README.md index 55bc3f0..162d818 100644 --- a/README.md +++ b/README.md @@ -4,27 +4,86 @@ [![](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 - Data Record Filtering in a Report -This example allows you to select individual dataset records in a DevExpress VCL [Data Grid](https://docs.devexpress.com/VCL/cxGrid.TcxGrid?v=25.2) control and display selected records in a built report using the [Report Viewer](https://docs.devexpress.com/XtraReports/401850/web-reporting/web-document-viewer) dialog. -Source data is stored in 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 – Filter Data Records in a Report + +This example allows you to select individual dataset records in a DevExpress VCL [Data Grid][TcxGrid] +control and display selected records in a built report using the [Report Viewer][report-viewer] dialog. +Source data is stored in a memory-based dataset ([TdxMemData] +inherited from the [TDataSet] class shipped with the standard VCL library). ## Prerequisites -* Microsoft Windows 10 or newer -* Embarcadero RAD Studio IDE 12.3 (Athens) or newer (Community Edition is not supported) -* DevExpress VCL Components v25.2.3 or newer +[DevExpress Reports Prerequisites][req] + +[req]: https://docs.devexpress.com/VCL/405773/ExpressCrossPlatformLibrary/vcl-backend/reports-dashboards-app-deployment#vcl-reportsdashboards-prerequisites -## Testing the example +## Test the Example Run the sample app and check any records in a table: ![Data Record Selection](/vcl-reports-selected-grid-records.png) -Click the **Preview Report** button to display a report containing all selected records in the [Report Viewer](https://docs.devexpress.com/XtraReports/401850/web-reporting/web-document-viewer) dialog. +Click the **Preview Report** button to display a report containing all selected records in the [Report Viewer][report-viewer] dialog. ![Selected Records in a Sample Report](/vcl-reports-sample-report-with-selected-records.png) + +## Documentation + +- [Introduction to DevExpress Reports for Delphi/C++Builder][reports-intro] +- [Tutorial: Create a table report using the Report Wizard][report-wizard] +- [Use JSON as a data source for dashboards (as demonstrated in the current example)][json-data-source] +- [Store report layouts in REPX files at design-time][reports-design-time-store] +- API reference: + - [TdxReport] + - [TdxReport.ReportName] (internal report name) + - [TdxReport.Layout] (an XML-based layout template that can be stored in a BLOB data field) + - [TdxReport.ShowViewer] + - [TdxMemData] (DevExpress in-memory dataset implementation) + - [TDataSet] (contains generic database connection methods) + - [TdxBackendDataSetJSONConnection] (supplies data to reports) + + + +[report-viewer]: https://docs.devexpress.com/XtraReports/401850/web-reporting/web-document-viewer +[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 +[json-data-source]: https://docs.devexpress.com/VCL/405747/ExpressCrossPlatformLibrary/vcl-backend/database-engines/vcl-backend-memory-based-data-storage +[reports-design-time-store]: https://docs.devexpress.com/VCL/dxReport.TdxReport.Layout#string-list-editor + + + +[TcxGrid]: https://docs.devexpress.com/VCL/cxGrid.TcxGrid?v=25.2 +[TdxReport]: https://docs.devexpress.com/VCL/dxReport.TdxReport +[TdxReport.Layout]: https://docs.devexpress.com/VCL/dxReport.TdxReport.Layout +[TdxReport.ReportName]: https://docs.devexpress.com/VCL/dxReport.TdxReport.ReportName +[TdxReport.ShowViewer]: https://docs.devexpress.com/VCL/dxReport.TdxReport.ShowViewer +[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 + + +[uMainForm.pas]: ./Delphi/uMainForm.pas +[uMainForm.cpp]: ./CPB/uMainForm.cpp + + +## More Examples + +- [Store report layouts in REPX files][file-example] +- [Store report layouts in a Database][database-example] +- [Generate reports in a backend / service application][non-interactive-export] +- [Localize Report Viewer and Report Designer dialogs][localize] + +[file-example]: https://github.com/DevExpress-Examples/vcl-reports-store-layout-template-file +[database-example]: https://github.com/DevExpress-Examples/vcl-reports-store-layout-template-database +[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?