public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport()
        {
            TaxCertificate rpt = new TaxCertificate();

            rpt.Site = this.Site;
            return(rpt);
        }
Пример #2
0
        public void ShowCustMoneyLedgerReport()
        {
            _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();

            data = taxBal.GetCustSummery(_custCode, _fromDate, _toDate);

            TaxStatementBAL TaxStatementBAL = new TaxStatementBAL();
            DataSet         TaxDataSet      = new DataSet();

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

            TaxCerfificateForm taxCerfificateForm = new TaxCerfificateForm();
            TaxCertificate     taxCertificate     = new TaxCertificate();

            if (TaxDataSet.Tables.Count > 2)
            {
                ((TextObject)taxCertificate.ReportDefinition.Sections[2].ReportObjects["txtCurrent_Brought_Cost_Total"]).Text = String.Format("{0:#,###0.00}", Convert.ToDouble(TaxDataSet.Tables[2].Rows[0][0])); // DepositWithdraw.Rows[0][0].ToString();
                ((TextObject)taxCertificate.ReportDefinition.Sections[2].ReportObjects["txtRealised_Gain_Total"]).Text        = String.Format("{0:#,###0.00}", Convert.ToDouble(TaxDataSet.Tables[2].Rows[0][3])); // DepositWithdraw.Rows[0][1].ToString();
                ((TextObject)taxCertificate.ReportDefinition.Sections[2].ReportObjects["txtUnrealised_Gain_Total"]).Text      = String.Format("{0:#,###0.00}", Convert.ToDouble(TaxDataSet.Tables[2].Rows[0][4])); //DepositWithdraw.Rows[0][1].ToString();
                ((TextObject)taxCertificate.ReportDefinition.Sections[2].ReportObjects["Market_Value_Total"]).Text            = String.Format("{0:#,###0.00}", Convert.ToDouble(TaxDataSet.Tables[2].Rows[0][2])); //DepositWithdraw.Rows[0][1].ToString();
            }

            taxCertificate.SetDataSource(data);

            //if (TaxDataSet.Tables.Count == 3)
            //{

            //    ((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.crTaxCer.ReportSource = taxCertificate;
            taxCerfificateForm.Show();
        }