I am trying to load a trdp file into memory to read what parameters a Report has to create a filter page to fill up the parameters. I also need to set the connection string and provider name dynamically. I can do it using the code on the follow link:
But, it works for trdx (legancy) file. Using a UriReportSource, the code bellow does not work for trdp file to take a Report object and read information on the report.
Report DeserializeReport(UriReportSource uriReportSource)
var settings = new System.Xml.XmlReaderSettings();
settings.IgnoreWhitespace = true;
using (var xmlReader = System.Xml.XmlReader.Create(uriReportSource.Uri, settings))
var xmlSerializer = new Telerik.Reporting.XmlSerialization.ReportXmlSerializer();
var report = (Telerik.Reporting.Report)xmlSerializer.Deserialize(xmlReader);
This code with trdx (which is a xml) works fine, but my question is about the binary trdp.
How can I convert a uriReportSource (or given a path for a trdp file how to take it) into a Telerik.Reporting.Report object?
I need to to read the structure of the report and make changes (replace connectionstirng, read expected parameters, etc..).