예제 #1
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 = CReportPartyStatement.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\PartyStatement.rdlc"; //(1)//
                localReport.DisplayName = "statement";

                localReport.DataSources.Add(new ReportDataSource("STATEMENT_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();
            }
        }
예제 #2
0
        //
        public void list_partystatement()
        {
            string voucher_type = Core.Invoice;

            Load_statement(CReportPartyStatement.Statement(Txt_party.Text, txt_from_date.Text, txt_to_date.Text, voucher_type));
        }