Change the project properties. Select the Project\WpfApplication Properties… item in the main menu.
Select the Target framework\.NET Framework4 item in the Application tab.
Press the “Yes” button in the opened window.
Note: We suppose you have Microsoft SQL Reporting Services installed and configured.
It’s necessary to add the report viewer component to the WPF application for displaying reports. Therefore you should add a reference to the PerpetuumSoft.ReportingServices.Viewer. This assembly, containing ReportViewer (right-click “Sample Application” in "Solution Explorer" and choose item “Add Reference” in context menu). Add references to the following assemblies to the project:
To create a WPF report viewer from your application.
Open MainWindow.xaml in the markup designer and add xml namespace for the PerpetuumSoft.ReportingServices.Viewer.WPF
Title="MainWindow" Height="350" Width="525">
Open the MainPage.xaml.cs source code and add the following code.
reportViewer.ReportingServicesUrl = @"http://localhost/ReportServer/ReportExecution2005.asmx";
reportViewer.ReportingServicesCredential = new System.Net.NetworkCredential()
Domain = "",
UserName = "",
Password = ""
reportViewer.ReportName = @"/AdventureWorks 2008 Sample Reports/Product Catalog 2008";
reportViewer.PerformAutomaticRendering = true;
In order to configure your WPFViewer you just need to set up ReportingServicesUrl property of the ReportViewer object. Also you should provide your Credentials for accessing Reporting Services including Domain, UserName and Password. If you will not set ReportingServicesCredential property windows authentication will be used to access reporting services.
Install PerpetuumSoft Xaml Rendering extension.
Note: The extension must be installed ONLY to Microsoft SQL Server Reporting Services 2008/2008 R2/2012 Developer, Enterprise or Standard editions. Make sure that your SQL Server edition supports custom rendering extensions.
Run PerpetuumSoft.XamlExtension.msi on the machine where Microsoft SQL Server Reporting Services is installed.
Follow the installer instructions on the screen.
The installer determines your SQL configurations and offers the list of the available Reporting Services instances.
Check/uncheck the instances to install/uninstall Rendering Extension to selected Reporting Services instances and click Apply Changes button.
Restart the affected instances of Reporting Services.
Run Sample Application.
Press Ctrl-F5 in Visual Studio environment to run the application.
If you cannot run application or any errors occurred during execution please contact Perpetuum Software support team by submitting a ticket or by e-mail firstname.lastname@example.org.
Please provide as much information as possible in the support request:
- You can select the error message, copy it to clipboard and attach to your email.
- You may also attach log.txt file (if it exists).
We have examined basic steps and got a simple and quite operable application. We didn’t have to write thousand lines of code – we only used ready-made implementation. It will be enough in most cases. If required behavior differs greatly from the one provided by default, you can change not only many aspects of the WPF Viewer for Reporting Services 2008/2008R2 /2012 work but also the appearance of the report viewer.