private void btnReport_Click(object sender, EventArgs e) { this.Cursor = Cursors.WaitCursor; // DataTable dt = new DataTable(); // dt = sqlHelper.GetStockReportSummary(((cmbShopGroup.Value == null || cmbShopGroup.Value.ToString() == "0") ? (long?)0 : (long)cmbShopGroup.Value), ((cmbCategory.Text == null || cmbCategory.ActiveRow.Cells["CategoryName"].Text.ToString() == "All") ? (string)"All" : (string)cmbCategory.ActiveRow.Cells["CategoryName"].Text)); var dt = _dispatchOrderService.Getdispatchorder(); // rptStock.Reset(); ReportDataSource rds = new ReportDataSource("DispatchOrderSummary", dt); rptViewer.LocalReport.ReportPath = Application.StartupPath + @"\Rdlc\DispatchOrderSummary.rdlc"; // ReportParameter[] Param = new ReportParameter[2]; //Param[0] = new ReportParameter("Outlet", cmbShopGroup.Text, true); //Param[1] = new ReportParameter("ReportDate", DateTime.Now.ToShortDateString(), true); //this.rptViewer.LocalReport.SetParameters(Param); this.rptViewer.LocalReport.Refresh(); rptViewer.LocalReport.DataSources.Clear(); rptViewer.LocalReport.DataSources.Add(rds); rptViewer.LocalReport.EnableHyperlinks = true; rptViewer.ProcessingMode = ProcessingMode.Local; rptViewer.RefreshReport(); // rptViewer.Drillthrough+=new DrillthroughEventHandler(rptViewer_Drillthrough ); rptViewer.Drillthrough += rptViewer_Drillthrough; this.Cursor = Cursors.Default; }
public void ListDispatchOrder() { LVdispatchorder.Items.Clear(); var data = _dispatchOrderService.Getdispatchorder(); var data1 = data.Where(a => a.IsCheckedByManager == false || a.IsCheckedByManager == null).ToList(); LVdispatchorder.DataSource = data1; LVdispatchorder.ValueMember = "DispatchOrderId"; LVdispatchorder.DisplayMember = "DealerName"; invisiblecolumns(); }