This is a migrated thread and some comments may be shown as answers.

Reporting Error

5 Answers 493 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
ram
Top achievements
Rank 1
ram asked on 11 Feb 2019, 12:54 PM

Hi,

I'm trying to integrate reporting rest service to Winforms Report Viewer

I'm getting the below error during report rendering

An exception has occurred while processing 'table1' item:

System.InvalidOperationException: The data provider of type 'Telerik.Reporting.Processing.WebServiceDataSource.WebServiceDataProvider, Telerik.Reporting.WebServiceDataSource, Version=13.0.19.116, Culture=neutral, PublicKeyToken=a9d7983dfcc261be' defined for data sources of type 'Telerik.Reporting.WebServiceDataSource' cannot be resolved. Are you missing an assembly reference?
   at Telerik.Reporting.Processing.Data.DataProviderFactory.ResolveDataProviderType(Object component, Type baseType, IDataProviderContext dataProviderContext)
   at Telerik.Reporting.Processing.Data.DataProviderFactory.GetDataProviderTypeCached(IDataSource component, IDataProviderContext dataProviderContext)
   at Telerik.Reporting.Processing.Data.DataProviderFactory.Telerik.Reporting.Processing.Data.IDataProviderFactory.Create(IDataSource definition, Object expressionContext, IDataProviderContext dataProviderContext)
   at Telerik.Reporting.Processing.Data.MultidimentionalDataProvider.Execute(MultidimensionalQuery query)
   at Telerik.Reporting.Processing.DataItemResolveDataAlgorithm.GetDataCore(IDataSource dataSource, MultidimensionalQuery query, IServiceProvider serviceProvider, EvalObject expressionContext, IProcessingContext processingContext)
   at Telerik.Reporting.Processing.DataItem.GetDataCore(IDataSource dataSource, MultidimensionalQuery query)
   at Telerik.Reporting.Processing.DataItem.<>c__DisplayClass1.<ResolveData>b__0()
   at Telerik.Reporting.Processing.DataItemResolveDataAlgorithm.ResolveData(String processingId, InMemoryState inMemoryState, MultidimensionalQuery query, Func`1 getDataCore, EvalObject expressionContext)
   at Telerik.Reporting.Processing.DataItem.ResolveData()
   at Telerik.Reporting.Processing.DataItem.ProcessItem()
   at Telerik.Reporting.Processing.Table.ProcessItem()
   at Telerik.Reporting.Processing.ReportItemBase.ProcessElement()
   at Telerik.Reporting.Processing.DataItem.ProcessElement()
   at Telerik.Reporting.Processing.ProcessingElement.Process(IDataMember dataContext)

 

Upon looking into this further i was unable to find the namespace Telerik.Reporting.Processing.WebServiceDataSource.WebServiceDataProvider

Some help would be appreciated

 

ReportsController Code

public class ReportsController : ReportsControllerBase
    {
        protected override Telerik.Reporting.Services.Engine.IReportResolver CreateReportResolver()
        {
            return new ProductReportResolver();
        }

        protected override Telerik.Reporting.Cache.Interfaces.ICache CreateCache()
        {
            return Telerik.Reporting.Services.Engine.CacheFactory.CreateFileCache();
        }

        [HttpPost]
        [ActionName("Parameters")]
        public override HttpResponseMessage GetParameters(string clientID, ClientReportSource reportSource)
        {
            try
            {
                return base.GetParameters(clientID, reportSource);
            }
            catch (Exception ex)
            {
                return null;
            }
        }

        [ActionName("DocumentResources")]
        [HttpGet]
        public override HttpResponseMessage GetResource(string clientID, string instanceID, string documentID, string resourceID)
        {
            try
            {
                return base.GetResource(clientID, instanceID, documentID, resourceID);
            }
            catch (Exception ex)
            {
                return null;
            }
        }

        protected override HttpStatusCode SendMailMessage(MailMessage mailMessage)
        {
            return HttpStatusCode.OK;
        }
    }

 

 

 

 

5 Answers, 1 is accepted

Sort by
0
ram
Top achievements
Rank 1
answered on 11 Feb 2019, 05:50 PM

i was unable to find any documentation related to WebServiceDataProvider class under Telerik.Reporting.Processing.WebServiceDataSource namespace/class 

 

Is there any documentation on how ReportsControllerBase interacts with ReportResolverBase and IStorage to cache and resolve reports, when i keep break point on Resolve method, i see multiple calls for Resolve method

0
Accepted
Silviya
Telerik team
answered on 14 Feb 2019, 10:04 AM
Hello Ram,

The occurred error indicates that the application is missing reference to Telerik.Reporting.WebServiceDataSource.dll in order to use it in a report. Please add it to you project as explained in the WebServiceDataSource component article. This assembly can be found in the \Bin subfolder of your Telerik Reporting installation directory. Please add the reference to that assembly and rebuild the project. When started, your report should work as expected.

As for additional documentation articles about how the Rest Service works, please refer to Telerik Reporting REST Services: How it works chapter of our official documentation. Here you can find information about Purpose and Usage of the Reporting REST Service Resolver and IStorage implementations.

Additionally, the Resolve(String) method will be called each time when the Reporting engine needs the report source. This can happen several times until the report document is completely rendered. It is important that when the method is invoked multiple times it returns exactly the same report source for a given value of the passed string argument.

Let us know if you need further assistance.

Regards,
Silviya
Progress Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
ram
Top achievements
Rank 1
answered on 15 Feb 2019, 09:43 AM
thank you, i was able to get the documentation and adding reference helps
0
Chris
Top achievements
Rank 1
answered on 31 Jul 2019, 02:52 PM
In addition, there is a Nuget for this assembly.  Way better than reffing dll directly.
0
Silviya
Telerik team
answered on 05 Aug 2019, 07:14 AM
Hi Chris,

You are absolutely correct. Telerik provides NuGet packages from private NuGet feed. Check How to: Add the Telerik private NuGet feed to Visual Studio article for further reference.
Note that the NuGet packages do not include design-time support.

Best Regards,
Silviya
Progress Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Tags
General Discussions
Asked by
ram
Top achievements
Rank 1
Answers by
ram
Top achievements
Rank 1
Silviya
Telerik team
Chris
Top achievements
Rank 1
Share this question
or