Version

Integrating ReportPlus to your Project

How to add ReportPlus.SDK libraries and the ReportPlusViewer component using a New Item template

When installing the SDK, the installer will add WPF and WinForms item templates to any installed Visual Studio version that is equal or higher to VS 2012. Using these templates, you will be able to (a) create a new DashboardView user control containing the ReportPlusViewer component and (b) add all the needed references to your project by installing these dependencies via NuGet.

In order to do this, you will need to:

  1. Right click the project you want to add a DashboardView to.

  2. Choose AddNew Item.

  3. In the opened dialog, you will find the item templates under Visual C#WPF and VisualC#Windows Forms. You can also choose to use the search at the top right.

Desktop-Embedding-Add-New-Item
Note
Note

Your project must target .NET 4.6 or higher in order for the item templates to be present in the Add New Item dialog.

Once the DashboardView item is created, you need to load a dashboard (as shown in How to Load a Dashboard) and feed it to the view through the DashboardView’s Dashboard property.

How to add ReportPlus.SDK libraries using a NuGet package

In order to use the ReportPlusViewer control in your application, you will need to install the SDK libraries first. These libraries are also available through the Infragistics.ReportPlus.Desktop.Sdk.Wpf NuGet package distributed as part of SDK installation. This package can be found under the Infragistics (Local) package source in Visual Studio.

In order to add that NuGet package to your WPF solution:

  1. Right click on the project’s References node and then click Manage NuGet Packages…

Desktop-Manage-NuGet-Packages
  1. In the NuGet Package Manager window:

    1. Select Infragistics (Local) as a package source.

    2. Filter the packages by typing “reportplus” in the search box.

    3. Select Infragistics.ReportPlus.Desktop.Sdk.Wpf NuGet package and then click the Install button.

Desktop-NuGet-Package-Manager-Window

Please note that:

  1. The NuGet package manager will also install other NuGet packages the Infragistics.ReportPlus.Desktop.Sdk.Wpf package depends on.

  2. The NuGet package manager will also add the Licenses.licx file to your project.

Desktop-Licenses-Licx-File

That file provides the licensing information concerning the ReportPlusViewer control and is need at compile time to verify if ReportPlus.SDK product is licensed or not.

    Infragistics.ReportPlus.Desktop.Controls.ReportPlusViewer,
    Infragistics.ReportPlus.Desktop.Sdk, Version=1.1.327, Culture=neutral,
    PublicKeyToken=ebbf8110063acd1a

How to add the ReportPlusViewer control to your application

Once theReportPlus.SDK libraries are added to your project, you can add the ReportPlusViewer control to your user control. Please refer to the Integrating ReportPlus to your Project section for more information about how ReportPlus.SDK libraries can be added to your project.

    <UserControl x:Class="ReportPlus.Desktop.Sdk.Samples.Views.DashboardView"
                 xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                 xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                 xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
                 xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
                 xmlns:rplus="http://schemas.infragistics.com/reportplus/ReportPlusDesktop">
        <Grid>
            <rplus:ReportPlusViewer Dashboard="{Binding Dashboard}" />
        </Grid>
    </UserControl>