Migrating to NA Reporting 2011.2

Miguel Machado / Monday, November 21, 2011

Topic Overview

Purpose 

This topic demonstrates how to migrate Reporting CTP projects to NetAdvantage™Reporting 2011.2.

In this topic                                                

  • Migration Procedure

    • Introduction
    • Requirements
    • Overview
    • Steps
  • Related Topics
  • Related Resources 

Migration Procedure

Introduction                                              

Projects and reports created with the CTP version of NetAdvantage Reporting need to be migrated to version 2011.2 in order to work properly. The migration includes:

  • In the project:

    • Updating the assemblies
    • Adding an image handler (only when the Report Service is hosted in a web project)
  • In the individual reports:
    • Updating the report version
    • Updating the definition URI 

The procedure that follows uses a typical Silverlight project as an example; the process works the same with WPF and WinForms projects.

Requirements 

NetAvantage Reporting 11.2 properly installed (If not, download it from here and install it first.).

Overview 

Following is a conceptual overview of the process: 

  1. Update the project

    1. Updating the references to the assemblies
    2. (Report Service hosted in Web Project only)Updating the additional assemblies
    3. (Report Service hosted in Web Project only)Adding an image handler to the Web project.
  2. Update the individual reports
    1. Updating the Report Version.
    2. Updating the report definition URI

Steps 

  1. Update the project.

Updating the project differs depending whether if you have a Report Service hosted in a Web Project (e.g. a hosted Silverlight project) or not. The difference is that, in the former, you need to update the web project references to the reporting assembliesr.

Note:

The InfragisticsSL4.Model.v11.1 assembly has been split into the following two assemblies:

  • InfragisticsSL4.Models.Presentation.v11.2
  • InfragisticsSL4.Models.Data.v11.2 
  1. Update the references to the assemblies.

Projects created with Reporting CTP will be referencing assemblies which are no longer available (e.g. *.v11.1).

a. Remove the old references.

In the Solution Explorer of your project, locate the references of the missing assemblies (e.g. *.v11.1) and remove them by right clicking on each and selecting the Remove option.

b. Add references to the new assemblies.

You need to add the following assembles:

  • InfragisticsSL4.Controls.Reports.v11.2
  • InfragisticsSL4.Reports.v11.2
  • InfragisticsSL4.Models.Presentation.v11.2
  • InfragisticsSL4.Models.Data.v11.2

 

To add the project references:

i. Right click on the References node in the Solution Explorer to display the context menu.

  ii Select the Add Reference option to add the assemblies.         

iii. In the Add Reference window, go to the .NET tab and select the new assemblies (specified in step b).

Note:

All NetAdvantage Reporting assemblies are available in the installation directory (e.g. C:\Program Files (x86)\Infragistics\NetAdvantage 2011.2\Reporting\Bin).

iv. Click OK to add the new references. 

 

2. (Report Service hosted in Web Project only)Update the additional assemblies. 

If you are using a Report Service with server-side rendering, you must updatethefollowing assemblies in your web project:

  • InfragisticsWPF4.Models.v11.1
  • InfragisticsWPF4.Controls.Client.v11.1
  • InfragisticsWPF4.Reports.Excel.v11.1
  • InfragisticsWPF4.Reports.Pdf.v11.1
  • InfragisticsWPF4.Reports.Server.v11.1
  • InfragisticsWPF4.Reports.v11.1

 Note:   

InfragisticsWPF4.Model.v11.1 has been split in the following two assemblies:

  • InfragisticsWPF4.Models.Presentation.v11.2
  • InfragisticsWPF4.Models.Data.v11.2 

a. Update the references to the corresponding NetAdvantage Reporting 2011.2 assemblies. The procedure is the same as described in step 1. After the update, the your web project references should look as follows:

 

                   

 b. Copy the assemblies to the output directory. 

i. In the Properties panel of the assembly,set the Copy Local property to True. (If the Properties panel is not visible, right click on the assembly and select the Properties option in the context menu.)

 This will copy the assembly to the output path of the project at run time.

ii. Repeat step 1.2.1 for every assembly you need to update.  

c. Update all references in the web.config file. 

All references in the web.config file should be updated to match the current version.

Open the web.config file and modify the version numberaccordingly (i.e. InfragisticsWPF4.Reports.Server.v11.1 should become InfragisticsWPF4.Reports.Server.v11.2). 

3. (Report Service hosted in Web Project only)Add an image handler to the Web project. 

NetAdvantage Reporting 2011.2 uses an image handler to render images from the server. Handlers are declared in the web.config file of your Web project. 

Open the web.config file and declare the following handler in the <httpHandlers> section. The <httpHandlers> section must be in within the <system.web> element tags, add it if necessary. 

In XML:

    <httpHandlers>

      <addpath="*.igrimage"verb="*"type="Infragistics.Reports.Server.ImagesHandler, InfragisticsWPF4.Reports.Server.v11.2, Culture=neutral, PublicKeyToken=7dd5c3163f2cd0cb"validate="false"/>

    </httpHandlers>

 

2. Update the individual reports.

a. Update the Report Version.

i. From the Solution Explorer, locate the report you need to update (e.g. Report1.igr).

 

ii. Convert the report to the latest version.

Open the report by double clicking on it in the Solution Explorer.

The report version will be validated against the current assemblies and you will be prompted to convert it to the latest version if necessary.

Click Yes to convert the report.

         The report model will be updated to match the current version.

Save the project.

iii. Verify the report’s build action.

Since the embedded resourcebuild action is not supported anymore, the EmbeddedResource setting of the Build Action property in a report is no longer valid, Make sure that, in the Properties panel, the Build Action is set to a valid value. The valid values are:

  • Resource
  • Content
  • None

For details about these options, refer to How to Reference Reports.

b. Update the report definition URI.

NetAdvantage Reporting 2011.2 uses a Pack URI to reference the reports. You need to update the DefinitionUri property in your Report Viewer to match the Pack Uri scheme (For details, refer to How to Reference Reports).

To do this, in the Report Viewer, change the RenderSettings tag (i.e. ServerRenderSettings) to the assembly that contains the report (ClassLibrary1in the example code below). 

In XAML:

        <ig:XamReportViewerName="xamReportViewer1">

            <ig:XamReportViewer.RenderSettings>

                <ig:ServerRenderSettingsDefinitionUri="ClassLibrary1.Report1.igr, ClassLibrary1"ServiceEndpointUri="/ReportService1.svc" />

            </ig:XamReportViewer.RenderSettings>

        </ig:XamReportViewer>

 

In XAML:

        <ig:XamReportViewerName="xamReportViewer1">

            <ig:XamReportViewer.RenderSettings>                <ig:ServerRenderSettingsDefinitionUri="/ClassLibrary1;component/Report1.igr"ServiceEndpointUri="/ReportService1.svc" />

            </ig:XamReportViewer.RenderSettings>

        </ig:XamReportViewer>

 

c. Repeat steps a.-b. for every report created with an older (than 11.2) version of NetAvantage Reporting. 

Related Topics 

Following are some other topics you may find useful. 

Related Resources 

Following are some articles you may find useful.