XAF - How to create and setup an XtraReport report for exporting to a Stream in a non-XAF application
This example illustrates how to access an XAF report stored in the database and populate it with data in a non-XAF application.
Since XAF stores reports in the database and XAF reports use Object Spaces to retrieve data from the database, it is necessary to connect to the XAF database and create an Object Space to use XAF reports in a non-XAF application.
- Create a custom class that implements the
IObjectSpaceProviderFactory
interface. Please refer to the CustomObjectSpaceProviderFactory.cs file for implementation details. This class is used as a service to createIObjectSpace
objects on demand. - Create the
ServiceCollection
to register required XAF services and yourCustomObjectSpaceProviderFactory
service. - Use the
IReportExportService
service to load and prepare a report.