E
elkin
Guest
Hi, I am catching up with the ABL syntax, so here is a runnable tested ABL version of the originally provided code (Sample 1, 2, 3) Note that you need to replace the actual paths to your report definition and runtime csv data. /* Deserialize the report instance from the report definition trdx */ DEFINE VARIABLE xmlSettings AS System.Xml.XmlReaderSettings. xmlSettings = NEW System.Xml.XmlReaderSettings(). xmlSettings:IgnoreWhitespace = TRUE. DEFINE VARIABLE xmlReader AS System.Xml.XmlReader. xmlReader = System.Xml.XmlReader:Create("C:\Work\Research\trdx\CsvReport.trdx", xmlSettings). DEFINE VARIABLE xmlSerializer AS Telerik.Reporting.XmlSerialization.ReportXmlSerializer. xmlSerializer = NEW Telerik.Reporting.XmlSerialization.ReportXmlSerializer(). DEFINE VARIABLE reportInstance AS Telerik.Reporting.Report. reportInstance = CAST(xmlSerializer
eserialize(xmlReader), Telerik.Reporting.Report). xmlReader
ispose(). /* Modify the report instance as needed */ DEFINE VARIABLE csvDataSource AS Telerik.Reporting.CsvDataSource. csvDataSource = CAST(reportInstance
ataSource, Telerik.Reporting.CsvDataSource). csvDataSource:Source = NEW System.Uri("C:\Work\Research\trdx\ds.txt"). /* Use the modified in-memory report definition in my app */ DEFINE VARIABLE instanceReportSource AS Telerik.Reporting.InstanceReportSource. instanceReportSource = NEW Telerik.Reporting.InstanceReportSource(). instanceReportSource:ReportDocument = reportInstance. THIS-OBJECT:reportViewer1:ReportSource = instanceReportSource. THIS-OBJECT:reportViewer1:RefreshReport(). Hope this helps. Milen
Continue reading...
Continue reading...