K2 Five includes the K2 ADO.NET provider (also known as the SOURCECODE data extension) for SQL Server Reporting Services (SSRS). However, it is not configured on the SSRS server so you must do that manually by following the steps in this article. You must also manually configure your development machine to create and edit reports.

SSRS Server Configuration

On your SSRS server, follow these steps:

  1. Copy the ADO.NET Provider DLL from your K2 server (<install drive>:\Program Files\K2\Bin\SourceCode.Data.SmartObjectsClient.dll) to your SSRS server (<install drive>:\Program Files\Microsoft SQL Server\MSRS13.MSSQLSERVER\Reporting Services\ReportServer\bin)
  2. Copy the following DLLs from your K2 server to the SSRS server:
  • SourceCode.Data.SmartObjectsClient.dll

  • SourceCode.Categories.Client.dll

  • SourceCode.HostClientAPI.dll

  • SourceCode.SmartObjects.Client.dll

  • SourceCode.SmartObjects.Management.dll

  1. Add all copied assemblies to the GAC on the SSRS server
  2. Edit the Report Server configuration file located at <install drive>:\Program Files\Microsoft SQL Server\MSRS13.MSSQLSERVER\Reporting Services\ReportServer\rsreportserver.config
  3. Go to the <Extensions><Data> section and add the following line:
    <Extension Name="SOURCECODE" Type="SourceCode.Data.SmartObjectsClient.SOConnection,SourceCode.Data.SmartObjectsClient, Version=4.0.0.0, Culture=neutral, PublicKeyToken=16a2c5aaaa1b130d" />
  4. Edit the machine.config files for the latest version of .NET you have installed on the server, for example C:\Windows\Microsoft.NET\Framework\v4.0.30319\Config\machine.config and C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Config\machine.config, adding the following lines:
  • In the configSections section add: <section name="SourceCode.Data.SmartObjectsClient" type="System.Data.Common.DbProviderConfigurationHandler, System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
  • In the DbProviderFactories section add: <add name="K2 SmartObjects Data Provider" type="SourceCode.Data.SmartObjectsClient.SOClientFactory, SourceCode.Data.SmartObjectsClient, Version=4.0.0.0, Culture=neutral, PublicKeyToken=16a2c5aaaa1b130d" description=".NET Framework Data Provider for K2 SmartObjects" invariant="SourceCode.Data.SmartObjectsClient" />
  1. Restart SQL Reporting Services service
  2. Restart IIS by running IISRESET from a command prompt

You are now able to use the SOURCECODE data source in SSRS.

Image

Visual Studio Report Designer Manual Configuration

To edit custom reports using the data source, you must also configure the Visual Studio Report Designer. On your development machine, follow these steps:

  1. Copy the ADO.NET Provider DLL from your K2 server (<install drive>:\Program Files\K2\Bin\SourceCode.Data.SmartObjectsClient.dll) to your VS client (<install drive>:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\PrivateAssemblies)
  2. Copy the following DLLs from your K2 server to your development machine:
  • SourceCode.Data.SmartObjectsClient.dll

  • SourceCode.Categories.Client.dll

  • SourceCode.HostClientAPI.dll

  • SourceCode.SmartObjects.Client.dll

  • SourceCode.SmartObjects.Management.dll

  1. Add all copied assemblies to the GAC
  2. Add the attached registry entries on your development machine. Download and unzip the registry entries. Note that these apply to Visual Studio 2015 so you may have to modify the path before inserting them.
  3. In Windows Explorer go to C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\Extension and create a folder named K2
  4. Copy the SourceCode.SmartObjects.VisualStudio.dll and SourceCode.VisualStudio.dll from the download of this article to the K2 folder
  5. Edit the Report Designer configuration file located at <install drive>:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\PrivateAssemblies\RSReportDesigner.config
  6. Navigate to the <Extensions><Data> section and add the following line:
    <Extension Name="SOURCECODE" Type="SourceCode.Data.SmartObjectsClient.SOConnection,SourceCode.Data.SmartObjectsClient, Version=4.0.0.0, Culture=neutral, PublicKeyToken=16a2c5aaaa1b130d" />
  7. Navigate to the <Extensions><Designer> section and add the following line:
    <Extension Name="SOURCECODE" Type="Microsoft.ReportingServices.QueryDesigners.GenericQueryDesigner, Microsoft.ReportingServices.QueryDesigners" />
  8. Edit the machine.config files for the latest version of .NET you have installed on the server, for example C:\Windows\Microsoft.NET\Framework\v4.0.30319\Config\machine.config and C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Config\machine.config, adding the following lines:
  • In the configSections section add: <section name="SourceCode.Data.SmartObjectsClient" type="System.Data.Common.DbProviderConfigurationHandler, System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
  • In the DbProviderFactories section add: <add name="K2 SmartObjects Data Provider" type="SourceCode.Data.SmartObjectsClient.SOClientFactory, SourceCode.Data.SmartObjectsClient, Version=4.0.0.0, Culture=neutral, PublicKeyToken=16a2c5aaaa1b130d" description=".NET Framework Data Provider for K2 SmartObjects" invariant="SourceCode.Data.SmartObjectsClient" />
  1. Restart Visual Studio

You are now able to use the K2 SmartObjects (SOURCECODE) data source in the Visual Studio Report Designer.

Image

Image

The Visual Studio entries are made automatically by the K2 Visual Studio components. If they were already installed with K2 4.7, the entries are preserved when upgrading to K2 Five.

You may find that you cannot create new reports using Report Builder but that you are able to edit existing ones. If this is the case, use Visual Studio to build new reports with the K2 SmartObjects data source.