Example #1
0
        public void ShowExenseSheet(string vNarration, DataTable dt)
        {
            try
            {
                DataTable dt1;
                objDAL.connectionstring = System.Configuration.ConfigurationManager.ConnectionStrings["MyString"].ConnectionString;
                dt1 = objDAL.getCompanyInfo();


                CrpExpenseSheet Rpt = new CrpExpenseSheet();

                Rpt.Database.Tables[0].SetDataSource(dt);
                Rpt.Database.Tables[1].SetDataSource(dt1);

                Rpt.SetParameterValue("PeriodNarration", vNarration);
                Rpt.SetParameterValue("NetSales", 0);
                Rpt.SetParameterValue("OpStockVal", 0);
                Rpt.SetParameterValue("NetPurchases", 0);
                Rpt.SetParameterValue("CurrentStockVal", 0);

                this.CRViewer.ReportSource = Rpt;
            }
            catch (Exception exc)
            {
                MessageBox.Show(exc.Message, "Error");
            }
        }
Example #2
0
        public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport()
        {
            CrpExpenseSheet rpt = new CrpExpenseSheet();

            rpt.Site = this.Site;
            return(rpt);
        }