示例#1
0
        public void RunReportTest()
        {
            Current.Company_id = "1";
            Current.Acy_id     = "4";
            Current.Comp_code  = CCompany_exten.GetCode_id(Current.Company_id);

            new SetCustomised();
            Customised.TaxType = Core.SGST;


            List <PrintCopies> printdata = new List <PrintCopies>();

            PrintCopies _printdata = new PrintCopies();

            printdata.Add(_printdata);
            printdata[0].Copies = _printdata.FirstCopy;

            D_Creditnote.Build();
            D_CreditnoteItem.Build();

            FReportPreview frpt = new FReportPreview();

            frpt.reportViewer1.ShowPrintButton = true;
            P_Creditnote.Print(frpt.reportViewer1, ("7"), printdata);
            //P_CreditnoteItem.Print(frpt.reportViewer1, ("6"));
            frpt.Show();
            frpt.BringToFront();
        }
示例#2
0
        private void Btn_print_Click(object sender, EventArgs e)
        {
            if ((Txt_party.Text != "") && (Txt_party.Text != null))
            {
                FReportPreview frpt = new FReportPreview();

                LocalReport localReport = frpt.reportViewer1.LocalReport;

                string voucher_type = string.Empty;

                voucher_type = Core.Invoice;

                var Statement = CReportQuotationStatement.Statement(Txt_party.Text, txt_from_date.Text, txt_to_date.Text, voucher_type);
                var v_company = CCompany_exten.PKId(Current.Company_id);

                localReport.ReportPath  = Application.StartupPath + @"\Reports\QuotationStatement.rdlc"; //(1)//
                localReport.DisplayName = "statement";

                localReport.DataSources.Add(new ReportDataSource("RQUOTATION_DS", Statement)); //(2)//
                localReport.DataSources.Add(new ReportDataSource("COMPANY_DS", new List <Company> {
                    v_company
                }));                                                                                              //(2)//

                frpt.reportViewer1.ShowPrintButton = true;
                frpt.reportViewer1.RefreshReport();
                frpt.Show();
            }
        }
        private void Btn_print_purchase_Click(object sender, EventArgs e)
        {
            FReportPreview frpt = new FReportPreview();

            LocalReport localReport = frpt.reportViewer1.LocalReport;

            List <Purchase_Gst> PURCHASE_DS = CollectPurchase();

            localReport.ReportPath  = Application.StartupPath + @"\Reports\Purchase_GST.rdlc"; //(1)//
            localReport.DisplayName = "Purchase GST Report";

            localReport.DataSources.Add(new ReportDataSource("PURCHASE_GST_DS", PURCHASE_DS)); //(2)//


            PrinterSettings v_PrinterSettings = new PrinterSettings();
            PaperSize       vUPaperSize       = new PaperSize("User Defined Paper Size", 827, 1166);

            v_PrinterSettings.DefaultPageSettings.PaperSize      = vUPaperSize;
            v_PrinterSettings.DefaultPageSettings.Landscape      = true;
            v_PrinterSettings.DefaultPageSettings.Margins.Left   = 0;
            v_PrinterSettings.DefaultPageSettings.Margins.Right  = 0;
            v_PrinterSettings.DefaultPageSettings.Margins.Top    = 0;
            v_PrinterSettings.DefaultPageSettings.Margins.Bottom = 0;

            frpt.reportViewer1.PrinterSettings = v_PrinterSettings;

            frpt.reportViewer1.ShowPrintButton = true;
            frpt.reportViewer1.SetPageSettings(v_PrinterSettings.DefaultPageSettings);
            frpt.reportViewer1.RefreshReport();
            frpt.Show();
        }
示例#4
0
        public RunReportTest()
        {
            Current.Comp_code = CCompany_exten.GetCode_id(Current.Company_id);

            new SetCustomised();
            Customised.TaxType = "Test invoice";

            List <PrintCopies> printdata = new List <PrintCopies>();

            PrintCopies _printdata = new PrintCopies();

            printdata.Add(_printdata);
            printdata[0].Copies = _printdata.FirstCopy;

            D_Invoice.Build();
            D_InvoiceItem.Build();

            FReportPreview frpt = new FReportPreview();

            frpt.reportViewer1.ShowPrintButton = true;
            P_Invoice.Print(frpt.reportViewer1, ("6"), printdata);
            //P_InvoiceItem.Print(frpt.reportViewer1, ("6"));
            frpt.Show();
        }
示例#5
0
        public void ShowReport(string id)
        {
            FReportPreview frpt = new FReportPreview();

            LocalReport localReport = frpt.reportViewer1.LocalReport;

            List <PUpvcSales>       UPVC_SALES_DS       = CollectSales(id);
            List <PUpvcSales_items> UPVC_SALES_ITEMS_DS = CollectSalesItems(id);

            //List<Invoice> UPVC_SALES_DS = CInvoice_exten.Showall();


            localReport.ReportPath  = Application.StartupPath + @"\Reports\UpvcSales.rdlc"; //(1)//
            localReport.DisplayName = "Sales print";

            localReport.DataSources.Add(new ReportDataSource("SALES_DS", UPVC_SALES_DS));       //(1)//
            localReport.DataSources.Add(new ReportDataSource("ITEMS_DS", UPVC_SALES_ITEMS_DS)); //(2)//


            PrinterSettings v_PrinterSettings = new PrinterSettings();
            PaperSize       vUPaperSize       = new PaperSize("User Defined Paper Size", 827, 1166);

            v_PrinterSettings.DefaultPageSettings.PaperSize      = vUPaperSize;
            v_PrinterSettings.DefaultPageSettings.Landscape      = true;
            v_PrinterSettings.DefaultPageSettings.Margins.Left   = 0;
            v_PrinterSettings.DefaultPageSettings.Margins.Right  = 0;
            v_PrinterSettings.DefaultPageSettings.Margins.Top    = 0;
            v_PrinterSettings.DefaultPageSettings.Margins.Bottom = 0;

            frpt.reportViewer1.PrinterSettings = v_PrinterSettings;

            frpt.reportViewer1.ShowPrintButton = true;
            frpt.reportViewer1.SetPageSettings(v_PrinterSettings.DefaultPageSettings);
            frpt.reportViewer1.RefreshReport();
            frpt.Show();
        }
示例#6
0
        private void Print_copies()
        {
            ///
            List <PrintCopies> printdata = new List <PrintCopies>();

            ///
            if (check_original.Checked)
            {
                PrintCopies _printdata = new PrintCopies();
                printdata.Add(_printdata);
                printdata[0].Copies = _printdata.FirstCopy;
            }
            ///
            if ((check_duplicate.Checked) && (check_original.Checked))
            {
                PrintCopies _printdata = new PrintCopies();
                printdata.Add(_printdata);
                printdata[1].Copies = _printdata.SecondCopy;
            }
            else if ((check_duplicate.Checked) && (!check_original.Checked))
            {
                PrintCopies _printdata = new PrintCopies();
                printdata.Add(_printdata);
                printdata[0].Copies = _printdata.SecondCopy;
            }
            ///
            if ((check_triplicate.Checked) && (check_duplicate.Checked) && (check_original.Checked))
            {
                PrintCopies _printdata = new PrintCopies();
                printdata.Add(_printdata);
                printdata[2].Copies = _printdata.ThirdCopy;
            }
            else if ((check_triplicate.Checked) && (!check_duplicate.Checked) && (check_original.Checked))
            {
                PrintCopies _printdata = new PrintCopies();
                printdata.Add(_printdata);
                printdata[1].Copies = _printdata.ThirdCopy;
            }
            else if ((check_triplicate.Checked) && (!check_duplicate.Checked) && (!check_original.Checked))
            {
                PrintCopies _printdata = new PrintCopies();
                printdata.Add(_printdata);
                printdata[0].Copies = _printdata.ThirdCopy;
            }
            else if ((check_triplicate.Checked) && (check_duplicate.Checked) && (!check_original.Checked))
            {
                PrintCopies _printdata = new PrintCopies();
                printdata.Add(_printdata);
                printdata[1].Copies = _printdata.ThirdCopy;
            }

            //if (Customise.IsDivision == true)
            //{
            //    Customise.SetDivision(Current.Company_id);
            //}

            //if (Core.TaxType == "1")
            //{
            //    D_PurchaseItem.Build();
            //    D_Purchase.Build();
            //}
            //else
            //{
            //    D_IgstPurchaseItem.build();
            //    D_IgstPurchase.build();
            //}

            FReportPreview frpt = new FReportPreview();

            frpt.reportViewer1.ShowPrintButton = true;
            //  P_Purchase.Print(frpt.reportViewer1, (vId), printdata);
            frpt.Show();
            print_panel.Hide();
            this.Hide();

            //if (Current.Company_id == "1")
            //{
            //D_PurchaseItem.build();
            //D_Purchase.build();
            //FReportPreview frpt = new FReportPreview();
            //frpt.reportViewer1.ShowPrintButton = true;
            //P_Purchase.Print(frpt.reportViewer1, (vId), printdata);
            //frpt.Show();
            //print_panel.Hide();
            //this.Hide();
            //}
            //else
            //{

            //    D2_PurchaseItem.build();
            //    D2_Purchase.build();
            //    FReportPreview frpt = new FReportPreview();
            //    frpt.reportViewer1.ShowPrintButton = true;
            //    P2_Purchase.Print(frpt.reportViewer1, (vPurchase_id), printdata);
            //    frpt.Show();
            //    print_panel.Hide();
            //    this.Hide();
        }
示例#7
0
        private void Print_copies()
        {
            ///
            List <PrintCopies> printdata = new List <PrintCopies>();

            ///
            if (check_original.Checked)
            {
                PrintCopies _printdata = new PrintCopies();
                printdata.Add(_printdata);
                printdata[0].Copies = _printdata.FirstCopy;
            }
            ///
            if ((check_duplicate.Checked) && (check_original.Checked))
            {
                PrintCopies _printdata = new PrintCopies();
                printdata.Add(_printdata);
                printdata[1].Copies = _printdata.SecondCopy;
            }
            else if ((check_duplicate.Checked) && (!check_original.Checked))
            {
                PrintCopies _printdata = new PrintCopies();
                printdata.Add(_printdata);
                printdata[0].Copies = _printdata.SecondCopy;
            }
            ///
            if ((check_triplicate.Checked) && (check_duplicate.Checked) && (check_original.Checked))
            {
                PrintCopies _printdata = new PrintCopies();
                printdata.Add(_printdata);
                printdata[2].Copies = _printdata.ThirdCopy;
            }
            else if ((check_triplicate.Checked) && (!check_duplicate.Checked) && (check_original.Checked))
            {
                PrintCopies _printdata = new PrintCopies();
                printdata.Add(_printdata);
                printdata[1].Copies = _printdata.ThirdCopy;
            }
            else if ((check_triplicate.Checked) && (!check_duplicate.Checked) && (!check_original.Checked))
            {
                PrintCopies _printdata = new PrintCopies();
                printdata.Add(_printdata);
                printdata[0].Copies = _printdata.ThirdCopy;
            }
            else if ((check_triplicate.Checked) && (check_duplicate.Checked) && (!check_original.Checked))
            {
                PrintCopies _printdata = new PrintCopies();
                printdata.Add(_printdata);
                printdata[1].Copies = _printdata.ThirdCopy;
            }

            Current.Comp_code = CCompany_exten.GetCode_id(Current.Company_id);

            new SetCustomised();

            Customised.TaxType = txt_taxtype_id.Text;
            D_Creditnote.Build();
            D_CreditnoteItem.Build();

            FReportPreview frpt = new FReportPreview();

            frpt.reportViewer1.ShowPrintButton = true;
            P_Creditnote.Print(frpt.reportViewer1, (vId), printdata);
            //P_CreditnoteItem.Print(frpt.reportViewer1, (vId));
            frpt.Show();
            print_panel.Hide();
            this.Hide();
        }
示例#8
0
        private void Print_copies()
        {
            ///
            List <PrintCopies> printdata = new List <PrintCopies>();

            ///
            if (check_original.Checked)
            {
                PrintCopies _printdata = new PrintCopies();
                printdata.Add(_printdata);
                printdata[0].Copies = _printdata.FirstCopy;
            }
            ///
            if ((check_duplicate.Checked) && (check_original.Checked))
            {
                PrintCopies _printdata = new PrintCopies();
                printdata.Add(_printdata);
                printdata[1].Copies = _printdata.SecondCopy;
            }
            else if ((check_duplicate.Checked) && (!check_original.Checked))
            {
                PrintCopies _printdata = new PrintCopies();
                printdata.Add(_printdata);
                printdata[0].Copies = _printdata.SecondCopy;
            }
            ///
            if ((check_triplicate.Checked) && (check_duplicate.Checked) && (check_original.Checked))
            {
                PrintCopies _printdata = new PrintCopies();
                printdata.Add(_printdata);
                printdata[2].Copies = _printdata.ThirdCopy;
            }
            else if ((check_triplicate.Checked) && (!check_duplicate.Checked) && (check_original.Checked))
            {
                PrintCopies _printdata = new PrintCopies();
                printdata.Add(_printdata);
                printdata[1].Copies = _printdata.ThirdCopy;
            }
            else if ((check_triplicate.Checked) && (!check_duplicate.Checked) && (!check_original.Checked))
            {
                PrintCopies _printdata = new PrintCopies();
                printdata.Add(_printdata);
                printdata[0].Copies = _printdata.ThirdCopy;
            }
            else if ((check_triplicate.Checked) && (check_duplicate.Checked) && (!check_original.Checked))
            {
                PrintCopies _printdata = new PrintCopies();
                printdata.Add(_printdata);
                printdata[1].Copies = _printdata.ThirdCopy;
            }

            //if (Current.Company_id == "1")
            //{
            CXBILL.Upvc.print.D_InvoiceItem.build();
            CXBILL.Upvc.print.D_Invoice.build();
            FReportPreview frpt = new FReportPreview();

            frpt.reportViewer1.ShowPrintButton = true;
            CXBILL.Upvc.print.P_Invoice.Print(frpt.reportViewer1, (vId), printdata);
            frpt.Show();
            print_panel.Hide();
            this.Hide();
            //}
            //else
            //{

            //    D2_InvoiceItem.build();
            //    D2_Invoice.build();
            //    FReportPreview frpt = new FReportPreview();
            //    frpt.reportViewer1.ShowPrintButton = true;
            //    P2_Invoice.Print(frpt.reportViewer1, (vInvoice_id), printdata);
            //    frpt.Show();
            //    print_panel.Hide();
            //    this.Hide();


            //new RunPrint().ShowReport();
        }