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

ReportSource type address resolution not implemented

2 Answers 141 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Alex
Top achievements
Rank 1
Alex asked on 02 Jul 2012, 09:05 AM
Hi,
I want to print user created reports in a Silverlight application. The reports will be created by users with Report Designer and imported in the application. Data will come from a database in the form of an IList of some business objects. I created a custom report resolver which returns an InstanceReportSource, but I get the following error: "ReportSource type address resolution not implemented.". Can you tell me if InstanceReportSource is supported in Q2 2012 and how should I use it?
Here is the code which creates the report:
public class ReportResolver : IReportResolver
{
    private readonly IReportResolver _parentResolver;
 
    public ReportResolver(IReportResolver parentResolver)
    {
        _parentResolver = parentResolver;
    }
 
    public ReportSource Resolve(string report)
    {
        ReportSource reportSource = null;
 
        reportSource = GetReportSource(report);
 
        if (reportSource == null && _parentResolver != null)
            reportSource = _parentResolver.Resolve(report);
 
        return reportSource;
    }
 
    public ReportSource GetReportSource(string report)
    {
        var settings = new XmlReaderSettings {IgnoreWhitespace = true};
 
        using (var xmlReader = XmlReader.Create(@"d:\repot.trdx", settings))
        {
            var xmlSerializer = new ReportXmlSerializer();
 
            var reportDocument = (Report) xmlSerializer.Deserialize(xmlReader);
 
            // Data will be read from database.
            reportDocument.DataSource = new List<int> {1, 2, 3};
 
            var reportSource = new InstanceReportSource {ReportDocument = reportDocument};
 
            return reportSource;
        }
    }
}

2 Answers, 1 is accepted

Sort by
0
Accepted
Peter
Telerik team
answered on 02 Jul 2012, 03:42 PM
Hi Alex,

This is a known issue and we have introduced a fix with the latest internal build. Give it a try and let us know if you still experience the issue.

Kind regards,
Peter
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 >

0
Alex
Top achievements
Rank 1
answered on 03 Jul 2012, 10:18 AM
Thanks. It works with the latest build.
Tags
General Discussions
Asked by
Alex
Top achievements
Rank 1
Answers by
Peter
Telerik team
Alex
Top achievements
Rank 1
Share this question
or