Goal: Change a trdx's web services data sources from using web service requests to using inline data strings and then render a PDF.
The trdx was created using the Invoice Report Wizard and has two data sources (one for header and one for detail). Both actually call the same web service method but use different data selectors ($.result and $.result.MemberReceiptDetails). I need to replace these calls with inline json strings (again, they'll be identical) and remove the parameters. I see the Report class has a DataSource property but how does this relate to multiple datasources?.
XmlReportSource reportSource = new XmlReportSource();
Report report = GetReportFromResources("Member.DuesReceipt.trdx");
//Change data sources here
StringBuilder builder = new StringBuilder();
using (System.Xml.XmlWriter xmlWriter = System.Xml.XmlWriter.Create(builder))
{
Telerik.Reporting.XmlSerialization.ReportXmlSerializer xmlSerializer =
new Telerik.Reporting.XmlSerialization.ReportXmlSerializer();
xmlSerializer.Serialize(xmlWriter, report);
}
reportSource.Xml = builder.ToString();
var reportProcessor = new ReportProcessor();
RenderingResult result = reportProcessor.RenderReport("PDF", reportSource, null);