Forum Post: SV: Telerik CsvDataSource - how do I find it?

  • Thread starter Thread starter goo
  • Start date Start date
Status
Not open for further replies.
G

goo

Guest
Sorry, I feel like OO dummy, anyway, I find it a bit strange that you can CAST DataSource into csvDataSource? DEFINE PUBLIC VARIABLE myReport AS Telerik.Reporting.Report NO-UNDO. DEFINE PUBLIC VARIABLE csvDataSource AS Telerik.Reporting.CsvDataSource NO-UNDO. myReport = new Telerik.Reporting.Report(). csvDataSource = new Telerik.Reporting.csvDataSource(). csvDataSource = CAST(myReport:DataSource, CsvDataSource). This will not compile…. So I probably should use the kind of strange solution that I got to work. Anyway, thanks for trying to make me understand J //Geir Otto Fra: elkin [mailto:bounce-elkin@community.progress.com] Sendt: 5. februar 2015 09:25 Til: TU.OE.Development@community.progress.com Emne: RE: [Technical Users - OE Development] Telerik CsvDataSource - how do I find it? RE: Telerik CsvDataSource - how do I find it? Reply by elkin Hi goo, No need to parse the report definition XML manually. Instead deserialize the report instance (Sample 1), modify the in-memory report definition instance (Sample 2) and pass this instance to the viewer (Sample 3). Once you have a live instance of the report, you use InstanceReportSource to feed the viewer instead of the UriReportSource. In Sample 2 you need to CAST the reports' data source to CsvDataSource as the DataSource property of the report is of type Telerik.Reporting.DataSource so that different data sources may be used. However you know that in yuor particular report the data source is actually CsvDataSource and you need to change one particular property of that CsvDataSurce. So the line var csvDataSource = (CsvDataSource)report.DataSource; should be translated into ABL to DEFINE PUBLIC VARIABLE csvDataSource AS Telerik.Reporting.CsvDataSource NO-UNDO. csvDataSource = CAST(report:DataSource, CsvDataSource) Hope this helps. Milen Stop receiving emails on this subject. Flag this post as spam/abuse. No virus found in this message. Checked by AVG - www.avg.com Version: 2015.0.5646 / Virus Database: 4273/9047 - Release Date: 02/02/15

Continue reading...
 
Status
Not open for further replies.
Back
Top