Beispiel #1
0
        private void ReportByTripCodeSummary_Load(object sender, EventArgs e)
        {
            SaleController controller = new SaleController();

            this.rpvTripCodeSummary.LocalReport.DataSources.Clear();

            ReportDataSource rds = new ReportDataSource();

            rds.Name  = "SaleDataSet_SaleDataTable";
            rds.Value = controller.SelectSummaryByTripCode(fromTripCode, toTripCode);
            this.rpvTripCodeSummary.LocalReport.DataSources.Add(rds);

            ReportParameter[] param = new ReportParameter[2];
            param[0] = new ReportParameter("FromTripCode", this.fromTripCode);
            param[1] = new ReportParameter("ToTripCode", this.toTripCode);

            this.rpvTripCodeSummary.LocalReport.SetParameters(param);
            this.rpvTripCodeSummary.ZoomMode = ZoomMode.Percent;

            this.rpvTripCodeSummary.RefreshReport();
        }