Ads 468x60px

Monday, April 23, 2012

XAF : Show Reports for Individual Views

The Reports module allows you to design reports for a filtered data source. In some scenarios, you may need to preview a report for a certain object or a set of objects that are not related by a criteria. For example, the Invoice business object(s) should be able to be printed in a specific manner. In this case, a specially designed report should be available for display for a particular set of Invoice objects. For this purpose, use the Inplace Reporting feature provided by the Reports module. This topic demonstrates how to use this feature.

To show selected object(s) in a specified report, the Reports module introduces the ShowInReport Action. This Action represents the SingleChoiceAction class instance. Its items represent so-called inplace reports that are designed for the current View's object type.




When executing this Action, the selected report is shown in the Preview window. This report presents the object(s) selected in the current Detail View or List View.

The ShowInReport Action is contained in PrintSelectionBaseController. This Controller collects the inplace reports that are appropriate for the current object type and creates corresponding items for the Action. When there are no appropriate inplace reports for the current object type, the ShowInReport Action is not activated. Inherit from this controller or use its events when implementing a custom functionality. This Controller has no platform-specific descendants. Inplace reports represent common reports that can be created in an XAF application. However, their ReportData.IsInplaceReport property is set to true. By default, this property is set to false. To specify this property, invoke a Detail View for the required report. To do this, use the EditReportController.Edit Action in the Windows Forms application:

In ASP.NET applications, you cannot invoke a Detail View for a report because of the Reports architecture. It is presumed that end-users can design and edit reports in Windows Forms applications only. In ASP.NET applications, they can only view and save them.

[http://documentation.devexpress.com/#xaf/CustomDocument3018]

No comments:

Post a Comment