or
<Window x:Class="MCCHomeWork.Main" xmlns:vm="clr-namespace:MCCHomeWork" xmlns:trr ="http://schemas.telerik.com/wpf" Title="Main" Height="300" Width="529"> <Grid Name="MyGrid"> <trr:ReportViewer Name="rep1"/> <Button Content="Click" Name="button3" Width="75" Height="100" Click="button3_Click" /> </Grid></Window><trr:ReportViewer Name="rep1"/>If dtrReader.HasRows Then
Dim dt As New DataTable
dt.Load(dtrReader)
ReportViewer1.Visible = True
ReportViewer1.Report.Reports(0).DataSource = dt
ReportViewer1.RefreshReport()
End If
ReportViewer1.Report.Reports(0).DataSource = dt and gives the warning that the Report property is now obsolete. Please use the ReportSource property instead. I can not figure out how to use the ReportSource property. Can someone please show me how to use it? Thanks,
void ExportToPDF(string reportName, Telerik.Reporting.IReportDocument reportToExport) { ReportProcessor reportProcessor = new ReportProcessor(); RenderingResult result = reportProcessor.RenderReport("PDF", reportToExport, null); using (FileStream fs = new FileStream(fileName, FileMode.Create))
{ fs.Write(result.DocumentBytes, 0, result.DocumentBytes.Length); } }<httpHandlers> <add type="Telerik.ReportViewer.WebForms.HttpHandler, Telerik.ReportViewer.WebForms, Version=6.0.12.215, Culture=neutral, PublicKeyToken=a9d7983dfcc261be" path="Telerik.ReportViewer.axd" verb="*" validate="true"/><br> </httpHandlers> <system.webServer> <validation validateIntegratedModeConfiguration="false"/> <modules runAllManagedModulesForAllRequests="true" /> <handlers> <add name="Telerik.ReportViewer.axd_*" type="Telerik.ReportViewer.WebForms.HttpHandler, Telerik.ReportViewer.WebForms, Version=6.0.12.215, Culture=neutral, PublicKeyToken=a9d7983dfcc261be" path="Telerik.ReportViewer.axd" verb="*" preCondition="integratedMode,runtimeVersionv2.0"/> </handlers> </system.webServer>