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

            rpt.Site = this.Site;
            return(rpt);
        }
        private void ShowPortFolioReportInvestorWise()
        {
            crIPOCustomerShareLedger objcr_DSE_22_1Report = new crIPOCustomerShareLedger();
            DataTable    dtProtofolioReportInvestorwise   = new DataTable();
            DESReportBal objPortfolioBal      = new DESReportBal();
            IPOShareLedgerPortfolioBAL objBAL = new IPOShareLedgerPortfolioBAL();
            CustShareSummeryViewer     objfrm_DSE_22_1_Report = new CustShareSummeryViewer();
            string deposit  = "0.00";
            string withdraw = "0.00";
            string balance  = "0.00";



            try
            {
                ShareLedgerBAL shareLedgerBal     = new ShareLedgerBAL();
                DataTable      dtCustSummerybasic = new DataTable();

                //RecordLevelFilteringBAL obj = new RecordLevelFilteringBAL(ResourceName.Customer_Share_Ledger_Share_Portfolio_Summery);
                //string T_Custcode = obj.FilterCustCode(_custCode, ResourceName.Customer_Share_Ledger_Share_Portfolio_Summery);
                //if (T_Custcode == "")
                //{
                //    MessageBox.Show("You are restricted");
                //    return;
                //}
                dtCustSummerybasic = shareLedgerBal.GetCustomerSummerBasicInfo(_custCode, dtToDate.Value);

                if (dtCustSummerybasic.Rows.Count != 0)
                {
                    deposit  = Convert.ToDouble(dtCustSummerybasic.Rows[0]["Dep_Amount"]).ToString("N");
                    withdraw = Convert.ToDouble(dtCustSummerybasic.Rows[0]["Withdraw_Amount"]).ToString("N");
                    balance  = Convert.ToDouble(dtCustSummerybasic.Rows[0]["Head_Balance"]).ToString("N");
                }

                //string temp_custCode = obj.FilterCustCode(_custCode, ResourceName.Customer_Share_Ledger_Share_Portfolio_Summery);
                //dtProtofolioReportInvestorwise = objPortfolioBal.Get_DSE_22_1_Report(_custCode, dtToDate.Value);
                dtProtofolioReportInvestorwise = objBAL.GetShareLedegerPortfolio(_custCode, dtToDate.Value);
                objcr_DSE_22_1Report.SetDataSource(dtProtofolioReportInvestorwise);

                GetCommonInfo();
                ((TextObject)objcr_DSE_22_1Report.ReportDefinition.Sections[2].ReportObjects["txtCompanyName"]).Text =
                    _CommpanyName;
                ((TextObject)objcr_DSE_22_1Report.ReportDefinition.Sections[2].ReportObjects["txtBranchInfo"]).Text =
                    _branchAddress + ". Phone:" + _branchContactNumber;

                ((TextObject)objcr_DSE_22_1Report.ReportDefinition.Sections[2].ReportObjects["txtCustCode"]).Text =
                    txtCustCode.Text;
                ((TextObject)objcr_DSE_22_1Report.ReportDefinition.Sections[2].ReportObjects["txtBOID"]).Text =
                    txtAccountHolderBOId.Text;
                ((TextObject)objcr_DSE_22_1Report.ReportDefinition.Sections[2].ReportObjects["txtCustName"]).Text =
                    txtAccountHolderName.Text;

                ((TextObject)objcr_DSE_22_1Report.ReportDefinition.Sections[2].ReportObjects["txtDeposit"]).Text =
                    deposit;
                ((TextObject)objcr_DSE_22_1Report.ReportDefinition.Sections[2].ReportObjects["txtWithdraw"]).Text =
                    withdraw;
                ((TextObject)objcr_DSE_22_1Report.ReportDefinition.Sections[2].ReportObjects["txtBalance"]).Text =
                    balance;

                ((TextObject)objcr_DSE_22_1Report.ReportDefinition.Sections[2].ReportObjects["asOnDate"]).Text =
                    dtToDate.Value.ToString("dd/MMM/yyyy");

                objfrm_DSE_22_1_Report.crvShareSummeryReportViewer.ReportSource     = objcr_DSE_22_1Report;
                objfrm_DSE_22_1_Report.crvShareSummeryReportViewer.DisplayGroupTree = false;
                objfrm_DSE_22_1_Report.Show();
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message, "Portfolio Report Investor Wise", MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
        }