This example illustrates how you can deploy a WPF Report Designer on the client (without a reporting server).
To deploy the WPF Report Designer locally, do the following.
1. Substitute the default client for the Report Designer with a custom one.
1.1. Create a custom client (in this sample, see LocalReportDesignerClient) that implements the IReportDesignerServiceClient interface. All methods of this interface are delegated from ReportService that is defined as a field or property in this client.
1.2. The client can refer to a ReportService type object, but it does not implement saving/loading of a report layout. For this reason, add an extension class that implements IDesignerReportStore interface (in this sample, see LocalDesignerReportStore class showing a simplified implementation of the LoadLayout and SaveLayout methods of the IDesignerReportStore interface).
1.3. In this sample, the Abort and CloseAsync methods in LocalReportDesignerClient are intentionally left empty, because they are not required.
1.4. Since the ReportDesignerViewModel exposes not the client, but its factory, you need to create this factory as well (in this sample, LocalReportDesignerClientFactory) and assign it to the Designer’s view model (in this sample, see MainWindow.xaml.cs).
2. For the ReportDesignerViewModel, specify a report's name and namespace, as well as a fake ServiceUri.
See also: How to use a WPF Report Designer in a client-server mode.
Question Comments
Added By: Xavier de LURION at: 9/19/2012 7:21:57 AM
In your exemple, you use a Report designed in Visual Studio, but how do you do to load it from database ?
Added By: Ramesh Supekar at: 6/6/2014 2:58:34 AMFor the example here in downloads
In ribbon control Watermark button click gives null reference error , Please guide how to fix this .