private void button1_Click(object sender, EventArgs e) { POSReport.Report.rptDetailSaleReport_2 DetailSaleReport = new rptDetailSaleReport_2(); string[] pa = { "@Store_ID", "@DateTime1", "@DateTime2", "@Status", "@Cashier_ID", "Report Title", }; object[] value = { StaticClass.storeId, startDate, endDate, "C", StaticClass.cashierId, "Báo cáo bán hàng chi tiết trong ngày" }; serviceGet.FillDataReport(DetailSaleReport, pa, value, true); ReportClass reportClass = DetailSaleReport; if (reportClass == null) { this.Dispose(); } //FrmViewReporting frmViewReporting = new FrmViewReporting(reportClass); //frmViewReporting.Show(); Utilities.Utils.Print(reportClass, Printer.PrinterHoadon); this.Dispose(); }
private void button1_Click_1(object sender, EventArgs e) { DateTime DateTime1 = new DateTime(2009, 12, 27); DateTime DateTime2 = new DateTime(2010, 1, 3); ReportClass invoiceT = new InvoiceTotal(); invoiceT.DataSourceConnections[0].SetConnection(Services.get_GUI.serverName, Services.get_GUI.databaseName, true); invoiceT.SetParameterValue("@Store_ID", StaticClass.storeId); invoiceT.SetParameterValue("@DateTime1", DateTime1); invoiceT.SetParameterValue("@DateTime2", DateTime2); //ReportClass invoice = new rptItemDept(); //string[] pa = {"@Store_ID","Report_Title_Param"}; //string[] value = {StaticClass.storeId,"mat hang"}; //test.FillDataReport(invoice,pa,value,true); //crystalReportViewer1.ReportSource = invoice; //ReportClass invoice = new rptInventoryByApha(); //string[] pa = { "@Store_ID", "Report_Title_Param" }; //string[] value = { StaticClass.storeId, "mat hang" }; //test.FillDataReport(invoice, pa, value, true); //crystalReportViewer1.ReportSource = invoice; ReportClass invoice = new rptInvoiceTotalsDaily(); string[] pa = { "@Store_ID", "Report_Title_Param" }; string[] value = { StaticClass.storeId, "mat hang" }; test.FillDataReport(invoice, pa, value, true); crystalReportViewer1.ReportSource = invoice; ////string[] para = {"@Store_ID", "Report_Title_Param" }; ////string[] value = {StaticClass.storeId,"Invoice Daily"}; ////test.FillDataReport(invoiceT, para, value, true); ////invoiceT.SetParameterValue("@Store_ID", StaticClass.storeId); ////invoiceT.SetParameterValue("Report_Title_Param", "thanh report"); //crystalReportViewer1.ReportSource = invoiceT; //string[] para = { "@Store_ID", "Report_Title_Param" }; //string[] value = { StaticClass.storeId, "Invoice Daily" }; //rptItemDept t = new rptItemDept(); //test.FillDataReport(t, para, value, true); //crystalReportViewer1.ReportSource = invoiceT}; ////crystalReportViewer1.Update(); //invoiceT.PrintToPrinter(1, false, 1, 1); //string result = MessBox2Choice.ShowBox("Do you want to exit?",Color.Red); //if (result.Equals("1")) //{ // MessageBox.Show("OK Button was Clicked"); //} //if (result.Equals("2")) //{ // MessageBox.Show("Cancel Button was Clicked"); //} }