Reporting Error

4 posts, 1 answers
  1. ram
    ram avatar
    3 posts
    Member since:
    Jan 2019

    Posted 11 Feb Link to this post

    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;
            }
        }

     

     

     

     

  2. ram
    ram avatar
    3 posts
    Member since:
    Jan 2019

    Posted 11 Feb in reply to ram Link to this post

    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

  3. Answer
    Silviya
    Admin
    Silviya avatar
    354 posts

    Posted 14 Feb Link to this post

    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
  4. ram
    ram avatar
    3 posts
    Member since:
    Jan 2019

    Posted 15 Feb in reply to Silviya Link to this post

    thank you, i was able to get the documentation and adding reference helps
Back to Top