Quantcast
Channel: DevExpress Support Center (Examples)
Viewing all articles
Browse latest Browse all 7205

How to create and setup an XtraReport report for exporting to a Stream in a non-XAF application

$
0
0

Scenario
If you want to use XAF report in non-XAF application, then you can follow these instructions to achieve this. 
Since XAF stores reports in the database, and XAF reports use the ObjectSpace to retrieve data from database, it is necessary to connect to the XAF database and create ObjectSpace to use XAF reports in a non-XAF application.

Steps to implement: 

1) Create a custom class which implements the IReportObjectSpaceProvider interface. Please refer to the ExportXafReport\MyReportObjectSpaceProvider.xx file for implementation details.
2) Create a custom class which inherits the ReportDataSourceHelper class and override the CreateReportObjectSpaceProvider method as shown in the ExportXafReport/MyReportDataSourceHelper.xx class.
3) Create ObjectSpace using the approach from the Access XAF Application Data in a non-XAF Application article and register required types in the TypesInfo. Please refer ExportXafReport/Program.xx file.
4) Use the approach described in the How to: Print a Report Without Displaying a Preview article to access and print a report.

This example contains XPO and EF implementations.


Viewing all articles
Browse latest Browse all 7205

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>