Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / Reporting > Telerik Reporting > Using an in-between class between Telerik.Reporting.Report and a report.

Answered Using an in-between class between Telerik.Reporting.Report and a report.

Feed from this thread
  • Patrick Intermediate avatar

    Posted on Feb 16, 2012 (permalink)

    Hello,
    the enclosed code was working with the 2011 Q3 version of Telerik Reporting but not with the 2012 Q1 version.
    The idea is to define a class that inherits from Telerik.Reporting.Report and to base the reports on this class instead of the Telerik one. The goal is to put in this class code that is common to more than one report to avoid duplicating code.
    So I define a class like this:
    using System;
    using Telerik.Reporting;
     
    namespace TestInheritedReport
    {
      public class MyReport : Telerik.Reporting.Report
      {
      }
    }
    And now my report inherits from MyReport instead of Telerik.Reporting.Report.
    The problem is now that every time I change something in the designer and click on the preview tab, I have an error message that says:
    The service Telerik.Reporting.Design.Interfaces.IRootDesignerPresenter already
    exists in the service container. Parameter name: serviceType


    And the call stack is:
    at System.ComponentModel.Design.ServiceContainer.AddService(Type serviceType,
    ServiceCreatorCallback callback, Boolean promote)
    at
    System.ComponentModel.Design.ServiceContainer.AddService(Type serviceType,
    ServiceCreatorCallback callback)
    at
    Telerik.Reporting.Design.VisualStudio.DependencyLoader.Initialize(IDesignerHost
    host)
    at Telerik.Reporting.Design.ReportRootDesigner.LoadDependencies()
    at
    Telerik.Reporting.Design.ReportRootDesigner.Initialize(IComponent
    component)
    at
    System.ComponentModel.Design.DesignerHost.AddToContainerPostProcess(IComponent
    component, String name, IContainer containerToAddTo)
    at
    System.ComponentModel.Design.DesignerHost.PerformAdd(IComponent component,
    String name)
    at
    System.ComponentModel.Design.DesignerHost.System.ComponentModel.Design.IDesignerHost.CreateComponent(Type
    componentType, String name)
    at
    System.ComponentModel.Design.Serialization.DesignerSerializationManager.CreateInstance(Type
    type, ICollection arguments, String name, Boolean addToContainer)
    at
    System.ComponentModel.Design.Serialization.DesignerSerializationManager.System.ComponentModel.Design.Serialization.IDesignerSerializationManager.CreateInstance(Type
    type, ICollection arguments, String name, Boolean addToContainer)
    at
    System.ComponentModel.Design.Serialization.TypeCodeDomSerializer.Deserialize(IDesignerSerializationManager
    manager, CodeTypeDeclaration declaration)
    at
    System.ComponentModel.Design.Serialization.CodeDomDesignerLoader.PerformLoad(IDesignerSerializationManager
    manager)
    at
    Microsoft.VisualStudio.Design.Serialization.CodeDom.VSCodeDomDesignerLoader.PerformLoad(IDesignerSerializationManager
    serializationManager)
    at
    System.ComponentModel.Design.Serialization.BasicDesignerLoader.BeginLoad(IDesignerLoaderHost
    host)


    In C#, I had to close the designer and open it again to make it work. In Oxygene (Delphi Prism), I had to close Visual Studio and open it again to make the designer work again; otherwise, it displays a black page with just a rectangle!
    It's really a waste of time to work this way

    Patrick

    Reply

  • Elian Elian admin's avatar

    Posted on Feb 17, 2012 (permalink)

    Hi Patrick,

    Thank you for pointing out this problem to us, we will investigate the issue further on and fix it.

    Side note: We have observed some dependency between this problem and the usage of events. Try to detach all the events from the code-behind and see if the issue still appears, if that may be of help.

    We have updated your Telerik points as a token of gratitude for bringing this to our attention.

    Greetings,
    Elian
    the Telerik team
    Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>

    Reply

  • Patrick Intermediate avatar

    Posted on Feb 17, 2012 (permalink)

    Hi Elian,
    in my case this is not an issue with events because I don't attach any event, as you can see in the test case.
    Patrick

    Reply

  • Steve Steve avatar

    Posted on Feb 17, 2012 (permalink)

    Hello Patrick,

    This was just an observation i.e. another case in which the problem surfaces. We are looking into the problem and would address it for subsequent internal build/service pack.

    Kind regards,
    Steve
    the Telerik team
    Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>

    Reply

  • Ross avatar

    Posted on Mar 7, 2012 (permalink)

    I just encountered this, on a report with events. Detaching the events did seem to remove the problem, although it only happened occasionally anyway, so I can't be 100% sure.

    Reply

  • Abhi Abhi's avatar

    Posted on Mar 15, 2012 (permalink)

    I'm using 2012 Q1 version of Telerik Reporting.

    And I too had the same issue which Patrick has.
    Please tell me when this issue is gonna fixed or any work around for it.

    Thanks,
    Abhi

    Reply

  • Steve Steve avatar

    Posted on Mar 15, 2012 (permalink)

    Hi Abhi,

    Closing the report designer and re-opening it is something we have found works. As stated previously, we would address the issue for the upcoming service pack (no date yet).

    Regards,
    Steve
    the Telerik team
    NEW in Q1'12: Telerik Report Designer (Beta) for ad-hoc report creation. Download as part of Telerik Reporting Q1 2012. For questions and feedback, use the new Telerik Report Designer Forum.

    Reply

  • Richard avatar

    Posted on Mar 20, 2012 (permalink)

    Unfortunately, I also have this problem and it occurs on every build of the project. Closing the designer and reopening does fix it albeit annoying...until the next build. 

    Reply

  • Jon Master avatar

    Posted on Apr 14, 2012 (permalink)

    I having the same issue too
    Guess I have to revert back to the old version

    Reply

  • Answer Steve Steve avatar

    Posted on Apr 17, 2012 (permalink)

    Hi guys,

    This problem has been addressed in the latest internal build which is available for download in your accounts.

    All the best,
    Steve
    the Telerik team
    NEW in Q1'12: Telerik Report Designer (Beta) for ad-hoc report creation. Download as part of Telerik Reporting Q1 2012. For questions and feedback, use the new Telerik Report Designer Forum.

    Reply

  • Patrick Intermediate avatar

    Posted on Jun 28, 2012 (permalink)

    Hello,
    this bug is corrected is Q2 2012
    Patrick

    Reply

  • Emiliya avatar

    Posted on Apr 24, 2013 (permalink)

    Hi, I am still using Telerik Reporting Q1 2012 and I experience the same issue. I  also inherit an in-between class between Telerik.Reporting.Report and a report.
    Unfortunately I am not allowed to use another Telerik Reporting version yet.
    Do you have any suggestions how I can fix the problem without upgrading the Telerik Reporting Version?

    Thank you!

    Reply

  • IvanY IvanY admin's avatar

    Posted on Apr 26, 2013 (permalink)

    Hi Emiliya,

    Up to your question: unfortunately you will have to either upgrade or downgrade to a version that does not have this issue since no workaround is available for the current version and problem.

    Greetings,
    IvanY
    the Telerik team

    Have you tried the new visualization options in Telerik Reporting Q1 2013? You can get them from your account.

    Reply

Back to Top

Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / Reporting > Telerik Reporting > Using an in-between class between Telerik.Reporting.Report and a report.
Related resources for "Using an in-between class between Telerik.Reporting.Report and a report."

Features  |  Documentation  |  Demos  |  Telerik TV  |  Knowledge Base  |  Code Library  |  Step-by-step Tutorial  |  Blogs  |  Whitepaper  ]