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