Ejemplo n.º 1
0
        public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport()
        {
            crCustWiseSellShareList rpt = new crCustWiseSellShareList();

            rpt.Site = this.Site;
            return(rpt);
        }
Ejemplo n.º 2
0
        public void ShowSellReport()
        {
            _branchId   = GlobalVariableBO._branchId;
            _transDate  = Convert.ToDateTime(dtTransactionDate.Value.ToShortDateString());
            _CustWise   = rdoCustwise.Checked;
            _InstruWise = rdoInstruWise.Checked;
            SellShareListReviewBAL sellShareListReviewBal = new SellShareListReviewBAL();
            DataTable dtSellShareListReview = new DataTable();

            if (_CustWise)
            {
                crCustWiseSellShareList           crSellShareListReview     = new crCustWiseSellShareList();
                CustWiseSellShareListReportViewer sellShareListReportViewer = new CustWiseSellShareListReportViewer();
                dtSellShareListReview = sellShareListReviewBal.GetCustWiseSellShareList(_transDate);

                _filterdColumnName = dtSellShareListReview.Columns[0].ToString();
                RecordLevelFilteringBAL obj = new RecordLevelFilteringBAL(dtSellShareListReview, _filterdColumnName, ResourceName.Buy_Sale_Report_Cust_Wise_Buy_Share_List);
                dtSellShareListReview = obj.GetRecordLevelFilteredData();

                crSellShareListReview.SetDataSource(dtSellShareListReview);

                GetCommonInfo();
                ((TextObject)crSellShareListReview.ReportDefinition.Sections[2].ReportObjects["txtCompanyName"]).Text = _CommpanyName;
                ((TextObject)crSellShareListReview.ReportDefinition.Sections[2].ReportObjects["txtBranchName"]).Text  = "Branch Name:" + _branchName + "," + _branchAddress + ". Phone:" + _branchContactNumber;
                if (_transDate != null)
                {
                    ((TextObject)crSellShareListReview.ReportDefinition.Sections[2].ReportObjects["txtReportDuration"]).Text = "Transaction Date: " + _transDate.ToString("dd-MMM-yy");
                }
                sellShareListReportViewer.crvSellShareList.ReportSource = crSellShareListReview;
                sellShareListReportViewer.Show();
            }
            else if (_InstruWise)
            {
                crInstruWiseSellShareList  crInstruWiseSellSharelist = new crInstruWiseSellShareList();
                InstruWiseSellReportViewer insWiseSellReport         = new InstruWiseSellReportViewer();
                dtSellShareListReview = sellShareListReviewBal.GetInstruWiseSellShareList(_transDate);

                _filterdColumnName = dtSellShareListReview.Columns[2].ToString();
                RecordLevelFilteringBAL obj = new RecordLevelFilteringBAL(dtSellShareListReview, _filterdColumnName, ResourceName.Buy_Sale_Report_Cust_Wise_Buy_Share_List);
                dtSellShareListReview = obj.GetRecordLevelFilteredData();

                crInstruWiseSellSharelist.SetDataSource(dtSellShareListReview);

                GetCommonInfo();
                ((TextObject)crInstruWiseSellSharelist.ReportDefinition.Sections[2].ReportObjects["txtCompanyName"]).Text = _CommpanyName;
                ((TextObject)crInstruWiseSellSharelist.ReportDefinition.Sections[2].ReportObjects["txtBranchName"]).Text  = "Branch Name:" + _branchName + "," + _branchAddress + ". Phone:" + _branchContactNumber;
                if (_transDate != null)
                {
                    ((TextObject)crInstruWiseSellSharelist.ReportDefinition.Sections[2].ReportObjects["txtReportDuration"]).Text = "Transaction Date: " + _transDate.ToString("dd-MMM-yy");
                }
                insWiseSellReport.crvInstruWiseSellReportViewer.ReportSource = crInstruWiseSellSharelist;
                insWiseSellReport.Show();
            }
            else
            {
                MessageBox.Show("Please Select the report category first.");
            }
        }