2 posts, 0 answers
  1. Chad
    Chad avatar
    1 posts
    Member since:
    Mar 2013

    Posted 01 Apr 2013 Link to this post

    First of I'm not sure if this belongs in the Winforms or Reporting Forums, so I apologize if its in the wrong area.

    I have just recently purchased telerik to use in my applications and that being said i would like to keep my application mainly using telerik controls eliminating Infragistics and Crystal Reports. I am currently working with Telerik Reporting and have a designed a simple report and created a radform with the reportviewer to load the report however in the past I am used to using the following for loading a crytal report.
    DateTime StartDate;
                DateTime EndDate;
                BuildDate(cboDate.Text, out StartDate, out EndDate);
                if (cboDate.Text == "Range")
                    StartDate = new DateTime(dtpStart.Value.Year, dtpStart.Value.Month, dtpStart.Value.Day, 0, 0, 0);
                    EndDate = new DateTime(dtpEnd.Value.Year, dtpEnd.Value.Month, dtpEnd.Value.Day, 23, 59, 59);
                using (ProductionService service = new ProductionService())
                    DataTable results = service.Report_BillingReport(StartDate, EndDate);
                    results.TableName = "BillingReport";
                    Reports.BillingReport water = new Reports.BillingReport();
                    frmReport rpt = new frmReport();
                    rpt.LoadedReport = water;
                    rpt.StartDate = StartDate;
                    rpt.EndDate = EndDate;


    now i do not believe that i need to set the data source on the click event because the report itself has been attached to the openaccess entity object as will all of the reports. However I am trying to figure out how to use a single reportviewer that has been created for opening multiple different reports I.E. Setting the reportsource for the reportviewer at the click_event and then showing the viewer. Currently where i have my code after reviewing multiple different posts and tutorials mostly for web based applications i have come to the following code:

    private void radLabel1_Click(object sender, EventArgs e)
        Telerik.Reporting.InstanceReportSource instanceReportSource = new Telerik.Reporting.InstanceReportSource();
        instanceReportSource.ReportDocument = new Reports.JobStatusReport();
        Reports.ReportViewer f = new Reports.ReportViewer();


    Thanks in advance for the help.

  2. Stef
    Stef avatar
    2930 posts

    Posted 04 Apr 2013 Link to this post

    Hi Chad,

    The ReportViewer is a control added to a form, thus all you need is to pass the report to the viewer, e.g. the approaches illustrated in the attached sample project. For more details and examples, check our online help and the examples accompanying your installation (installed under C:\Program Files (x86)\Telerik\Reporting Q1 2013\Examples by default).

    If we have misunderstood your questions, please further elaborate on your scenario.

    the Telerik team

    Have you tried the new visualization options in Telerik Reporting Q1 2013? You can get them from your account.

  3. DevCraft banner
Back to Top