Then proceed to the “Downloads” section.
Find the license key for the product in the products’ list.

Installation
After you downloaded the license key, run the [ProductName].msi file (for example SharpShooterCollection.msi). To install it you need administrative rights.
At the “Additional Options” stage select the following options:
- Copy dlls to GAC;
- Add components to Visual Studio Toolbox. It is possible to change the list of displayed elements on Toolbox after you install the component into Visual Studio.
Licensing
If you have the license, launch the License Manager from the Start menu to install the license.
To add the license press the “Add from file” button, and select the *. elic which you downloaded. Press the “Close” button to close License Manager.
If you don’t have the license, then there will appear “Trial” pop-ups during the work with the Perpetuum Software components.
There will be shown watermark during the work in the viewer designer.
Developing
Step 1. Applications Creation
Open Visual Studio. Create a new WPF Application project (use .NET Framework 4).
If you use Client Profile as a default framework, then change it for the full version of framework in the project’s properties.
Step 2. Adding Report Template to the Report
Add a new Item – SharpShooter Reports Template to the project.

Step 3. Adding References
Add references to the following assemblies to the project:
- PerpetuumSoft.Charts
- PerpetuumSoft.Framework
- PerpetuumSoft.Framework.Export
- PerpetuumSoft.Framework.Model
- PerpetuumSoft.Instrumentation
- PerpetuumSoft.Reporting
- PerpetuumSoft.Reporting.Export.Excel
- PerpetuumSoft.Reporting.Export.Html
- PerpetuumSoft.Reporting.Export.OpenXML
- PerpetuumSoft.Reporting.Export.Pdf
- PerpetuumSoft.Reporting.Export.Rtf
- PerpetuumSoft.Reporting.Export.Xps
- PerpetuumSoft.Reporting.WPF
- PerpetuumSoft.Reporting.Xaml.Export
Step 4. Adding XAML Code
Add the following code (highlighted with yellow) to MainWindow.xaml:
<Window x:Class="WPFSample.MainWindow"
xmlns:reports="clr-namespace:PerpetuumSoft.Reporting.WPF;assembly=PerpetuumSoft.Reporting.WPF"
Title="ReportViewer" Height="auto" Width="auto">
<Grid>
<reports:ReportViewer x:Name="reportViewer">
<reports:ReportViewer.Source>
<reports:ReportSource x:Name="reportSource" Source="c:\Projects\WPFSample\WPFSample\ReportTemplate1.rst">
</reports:ReportSource>
</reports:ReportViewer.Source>
</reports:ReportViewer>
</Grid>
</Window>
A direct path to the file is used as Source. You can copy it from the corresponding properties field of the template file.

Step 5. Creating and Filling Data Sources
Use a List of Business Objects as a data source. Add a new Employee class to the project. The class has the following structure:
internal class Employee
{
public string FirstName { get; set; }
public string LastName { get; set; }
public string Title { get; set; }
public string Phone { get; set; }
public DateTime BirthDate { get; set; }
public string Address { get; set; }
}
Fill the collection of products and add the Data Source collection to reportSource (for example, in the Loaded form event handler)
Step 6. Editing Report Template
You need to edit the report. It is possible to do this in runtime or design time. It is more convenient to edit the report template in runtime.

Add ability to edit the template in runtime to the application. Put the Design Template button on the form. Add the following handler to this button’s click event:
private void designTemplate_Click(object sender, RoutedEventArgs e)
{
reportSource.DesignTemplate();
reportViewer.RenderDocument();
}
If you want to edit the report template in design time, then double click by the corresponding Item in Solution Explorer.

Step 7. Designing Report
Run the application and press the Design Template button. You can select the program language in the designer: CSharp, Visual Basic or custom language. Select the needed one in the ScriptLanguage property of the Document. CSharp is used in this example.
In this example the report is created with Table Wizard to simplify the process of report creation. Click the Table button on the Insert tab. Select Data source in the opened Table Wizard.

Select FirstName, LastName, Phone and Address as Selected fields. Click Next >. Use the default fields’ settings, click Next >. Specify sorting by LastName and FirstName. Click Finish.

After this you can edit the table according your needs. For example, you can change the text alignment, highlight title, etc.:

Step 8. Viewing Report
Save the template and close the designer. The report you created is displayed in ReportViewer.

If you don’t want your end users to edit the template, you can remove the Design Template button and change ReportSource.Source to the resource path (the added templates have Resource type by default):
<reports:ReportViewer x:Name="reportViewer" Grid.Row="1">
<reports:ReportViewer.Source>
<reports:ReportSource x:Name="reportSource" Source="/WPFSample;component/ReportTemplate1.rst"/>
</reports:ReportViewer.Source>
</reports:ReportViewer>
If you have any questions regarding the integration with SharpShooter Reports.WPFin don’t hesitate to contact us at support@perpetuumsoft.com