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

Upgrade to Q2 2012

1 Answer 350 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Julien
Top achievements
Rank 1
Julien asked on 23 Jul 2012, 03:39 PM
Hi,
I've juste upgraded one of my projects to Q2 2012 telerik reporting. I've got some difficulties now to correct obsolete statements.
Here is the context :
I have reports created who inherits from Report :
public partial class MyUsers: Telerik.Reporting.Report
{
}
I can't figure out how to resolve those warnings :
Telerik.Reporting.Processing.PictureBox isActif = (Telerik.Reporting.Processing.PictureBox)section.ChildElements.Find("IsActif", true)[0];
 
Warning 21  'Telerik.Reporting.Processing.ProcessingElement.ChildElements' is obsolete: 'The Telerik.Reporting.Processing.ProcessingElement.ChildElements property is now obsolete. Use Telerik.Reporting.Processing.ElementTreeHelper.GetChildElements() method instead.'  C:\Code_Source\.REPORTING
Ant this one :
report = new REPORTING.MyUsers();
 
Warning 26  'Telerik.Reporting.Report.implicit operator Telerik.Reporting.ReportSource(Telerik.Reporting.Report)' is obsolete: 'The implicit Report to ReportSource conversion is obsolete. Please create InstanceReportSource instead.'    C:\Code_Source\

Is there anybody there who could help me or give me hints ?

1 Answer, 1 is accepted

Sort by
0
Accepted
IvanY
Telerik team
answered on 24 Jul 2012, 05:05 PM
Hi Julien,

In our last Q release we introduced a new level of abstraction for addressing report documents. So called Report Sources allow providing a report from Instance, Type, Uri...

In order to adopt the new syntax using the report sources you have to do this (in your case using an InstanceReportSource):
var report = new Sample();
var instanceReportSource = new Telerik.Reporting.InstanceReportSource();
instanceReportSource.ReportDocument = report;

As for the GetChildElements() method you can find more information and a code snippet here.

Regards,
IvanY
the Telerik team

BLOGGERS WANTED! Write a review about Telerik Reporting or the new Report Designer, post it on your blog and get a complimentary license for Telerik Reporting. We’ll even promote your blog and help bring you a few fresh readers. Yes, it’s that simple. And it’s free. Get started today >

Tags
General Discussions
Asked by
Julien
Top achievements
Rank 1
Answers by
IvanY
Telerik team
Share this question
or