I am trying to load the telerik report on win form where i have a report viewer to show it ... But I am not successfull to load it. I am not getting its code working write. I want to make it on form load .
private void Form1_Load(object sender, EventArgs e)
{
//Code here to load telerik
}
Any way to load it like crystal report can load
{
crystalReportViewer1.ReportSource = (@"C:\Users\CrystalReport1.rpt");
}
errors I am getting when I am do this
{
Telerik.Reporting.TypeReportSource typeReportSource = new Telerik.Reporting.TypeReportSource();
typeReportSource.TypeName = "Telerik.Reporting.Examples.CSharp.ListBoundReport, CSharp.ReportLibrary";
this.reportViewer1.ReportSource = typeReportSource;
reportViewer1.RefreshReport();
}
What I normally do is to deign the report inside VS in a class library. I then reference the class library in the application, ASP or Winforms. In your case, Winforms, once you have added your class library to the bin, select the "Report Source" from the report viewer properties and add the report from a path or selecting your class library. Thats it.
For more reference, have a look here.