Exemplo n.º 1
0
        public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport()
        {
            ReportListFeedback rpt = new ReportListFeedback();

            rpt.Site = this.Site;
            return(rpt);
        }
Exemplo n.º 2
0
        private void btnSearch_Click(object sender, EventArgs e)
        {
            try
            {
                if (ddlCuaKhau.SelectedValue.ToString() == "")
                {
                    MessageBox.Show("Chưa chọn đơn vị hải quan");
                    return;
                }
                var report = new ReportListFeedback();

                var txtReceiver = (TextObject)report.Section1.ReportObjects["txtReceiver"];
                txtReceiver.Text = txtReceiver.Text + CustomsFacory.FindByCode(ddlCuaKhau.SelectedValue.ToString()).CustomsName;

                List <tblHandover> listHandover = TrainFactory.SearchBBBG(txtNumberBBBG.Text.Trim(), cbNgayXNC.Checked, dtpFrom.Value, dtpTo.Value, ddlCuaKhau.SelectedValue.ToString());

                if (listHandover == null || listHandover.Count == 0)
                {
                    MessageBox.Show("Không có dữ liệu thỏa mãn điều kiện tìm kiếm này");
                    return;
                }
                DataSet1  dataset = new DataSet1();
                DataTable dt      = dataset.tblHandover;

                foreach (tblHandover obj in listHandover)
                {
                    dt.Rows.Add(obj.ID,
                                obj.NumberHandover,
                                obj.DateHandover,
                                obj.CodeStation,
                                obj.CodeStationFromTo,
                                obj.StatusGoods,
                                obj.StatusVehicle,
                                obj.CreatedDate,
                                obj.CreatedBy,
                                obj.ModifiedDate,
                                obj.ModifiedBy,
                                obj.NumberReply,
                                obj.DateReply,
                                obj.NoteReply,
                                obj.IsDeleted,
                                obj.IsReplied,
                                obj.Note,
                                obj.Type,
                                obj.ReplyStatusGoods);
                }

                report.SetDataSource(dataset);

                FrmPreviewReport frmReport = new FrmPreviewReport(report);
                frmReport.MdiParent = this.MdiParent;
                frmReport.Show();
            }
            catch (Exception ex)
            {
            }
        }
Exemplo n.º 3
0
 public FrmPreviewReport(ReportListFeedback report)
 {
     InitializeComponent();
     crystalReportViewer1.ReportSource = report;
 }