Пример #1
0
        public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport()
        {
            cr_additionalShare rpt = new cr_additionalShare();

            rpt.Site = this.Site;
            return(rpt);
        }
Пример #2
0
        public void ShowCustTaxStatement()
        {
            _branchId = GlobalVariableBO._branchId;
            _fromDate = Convert.ToDateTime(dtFromDate.Value.ToShortDateString());
            _toDate   = Convert.ToDateTime(dtToDate.Value.ToShortDateString());
            _custCode = txtCustCode.Text;

            TaxBAL          taxBal          = new TaxBAL();
            DataTable       data            = new DataTable();
            DataTable       DepositWithdraw = new DataTable();
            TaxStatementBAL TaxStatementBAL = new TaxStatementBAL();
            DataSet         TaxDataSet      = new DataSet();

            TaxDataSet = TaxStatementBAL.GetData(_custCode, _fromDate, _toDate);

            data            = taxBal.GetTaxStatement(_custCode, _fromDate, _toDate);
            DepositWithdraw = taxBal.GetDepositWithdrawBalence(_custCode, _fromDate, _toDate);

            //////// Code for Additional Share ****************//////
            cr_additionalShare cradditionalShare = new cr_additionalShare();
            DataTable          dtAdditionalShare = new DataTable();

            dtAdditionalShare = taxBal.GetAdditiobnalShare(_custCode, _fromDate, _toDate);
            // cradditionalShare.SetDataSource(dtAdditionalShare);
            //////// End ****************///////////////////////


            TaxCerfificateForm taxCerfificateForm = new TaxCerfificateForm();
            cr_TaxStatement    taxStatement       = new cr_TaxStatement();

            taxStatement.SetDataSource(data);
            taxStatement.Subreports[0].SetDataSource(dtAdditionalShare);
            taxCerfificateForm.crTaxCer.ReportSource = taxStatement;

            GetCommonInfo();
            ((TextObject)taxStatement.ReportDefinition.Sections[2].ReportObjects["txtCompanyName"]).Text = _CommpanyName;
            ((TextObject)taxStatement.ReportDefinition.Sections[2].ReportObjects["txtAddress"]).Text     = "Branch Name:" + _branchName + "," + _branchAddress + ". Phone:" + _branchContactNumber;

            ((TextObject)taxStatement.ReportDefinition.Sections[2].ReportObjects["txtFromDate"]).Text   = dtFromDate.Value.ToString("dd-MM-yyyy") + " To " + dtToDate.Value.ToString("dd-MM-yyyy");
            ((TextObject)taxStatement.ReportDefinition.Sections[2].ReportObjects["txtClientCode"]).Text = txtCustCode.Text;
            ((TextObject)taxStatement.ReportDefinition.Sections[2].ReportObjects["txtBoid"]).Text       = txtAccountHolderBOId.Text;
            ((TextObject)taxStatement.ReportDefinition.Sections[2].ReportObjects["txtClientName"]).Text = txtAccountHolderName.Text;
            ((TextObject)taxStatement.ReportDefinition.Sections[2].ReportObjects["txtSummary"]).Text    = "Summary(" + dtFromDate.Value.ToString("dd-MM-yyyy") + " To " + dtToDate.Value.ToString("dd-MM-yyyy") + ")";

            ((TextObject)taxStatement.ReportDefinition.Sections[2].ReportObjects["txtDeposit"]).Text  = DepositWithdraw.Rows[0][0].ToString();
            ((TextObject)taxStatement.ReportDefinition.Sections[2].ReportObjects["txtWithdraw"]).Text = DepositWithdraw.Rows[0][1].ToString();

            if (TaxDataSet.Tables.Count > 2)
            {
                ((TextObject)taxStatement.ReportDefinition.Sections[2].ReportObjects["txtSold_Cost_Total"]).Text       = TaxDataSet.Tables[2].Rows[0][1].ToString(); // DepositWithdraw.Rows[0][0].ToString();
                ((TextObject)taxStatement.ReportDefinition.Sections[2].ReportObjects["txtRealised_Gain_Total"]).Text   = TaxDataSet.Tables[2].Rows[0][3].ToString(); // DepositWithdraw.Rows[0][1].ToString();
                ((TextObject)taxStatement.ReportDefinition.Sections[2].ReportObjects["txtUnrealised_Gain_Total"]).Text = TaxDataSet.Tables[2].Rows[0][4].ToString(); //DepositWithdraw.Rows[0][1].ToString();
            }

            taxCerfificateForm.Text = "Tax Statement";
            taxCerfificateForm.Show();
        }