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

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

12 Answers 251 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Patrick
Top achievements
Rank 2
Veteran
Iron
Patrick asked on 16 Feb 2012, 08:47 PM
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

12 Answers, 1 is accepted

Sort by
0
Elian
Telerik team
answered on 17 Feb 2012, 05:29 PM
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 >>
0
Patrick
Top achievements
Rank 2
Veteran
Iron
answered on 17 Feb 2012, 05:35 PM
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
0
Steve
Telerik team
answered on 17 Feb 2012, 05:39 PM
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 >>
0
Lucania
Top achievements
Rank 1
answered on 07 Mar 2012, 06:02 AM
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.
0
Abhi
Top achievements
Rank 1
answered on 15 Mar 2012, 09:02 AM
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
0
Steve
Telerik team
answered on 15 Mar 2012, 10:12 AM
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.
0
Richard
Top achievements
Rank 2
answered on 20 Mar 2012, 03:47 PM
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. 
0
Jon
Top achievements
Rank 1
answered on 14 Apr 2012, 08:31 PM
I having the same issue too
Guess I have to revert back to the old version
0
Accepted
Steve
Telerik team
answered on 17 Apr 2012, 12:07 PM
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.
0
Patrick
Top achievements
Rank 2
Veteran
Iron
answered on 28 Jun 2012, 07:33 AM
Hello,
this bug is corrected is Q2 2012
Patrick
0
Emiliya
Top achievements
Rank 1
answered on 24 Apr 2013, 08:09 AM
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!
0
IvanY
Telerik team
answered on 26 Apr 2013, 02:00 PM
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.

Tags
General Discussions
Asked by
Patrick
Top achievements
Rank 2
Veteran
Iron
Answers by
Elian
Telerik team
Patrick
Top achievements
Rank 2
Veteran
Iron
Steve
Telerik team
Lucania
Top achievements
Rank 1
Abhi
Top achievements
Rank 1
Richard
Top achievements
Rank 2
Jon
Top achievements
Rank 1
Emiliya
Top achievements
Rank 1
IvanY
Telerik team
Share this question
or