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

            rpt.Site = this.Site;
            return(rpt);
        }
Exemplo n.º 2
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="ExpenseOrPayment"></param>
        /// <param name="sorting">NEW added Sorting</param>
        private void MonthlyexpenseReport(string ExpenseOrPayment, string sorting)
        {
            ExpenseEntryBAL bal = new ExpenseEntryBAL();
            DataTable       dt  = new DataTable();

            dt = bal.GetMonthlyExpenseReport((DateTime)dt_FromDate.Value, (DateTime)dt_ToDate.Value, ExpenseOrPayment);
            crExpenseMonthly cr = new crExpenseMonthly();
            frmReportViewer  objreportviewer = new frmReportViewer();

            cr.SetDataSource(dt);
            GetCommonInfo();

            ((TextObject)cr.ReportDefinition.Sections[2].ReportObjects["txtcompanyname"]).Text = _CommpanyName;
            ((TextObject)cr.ReportDefinition.Sections[2].ReportObjects["txtaddress"]).Text     = "Branch Name:" + _branchName + "," + _branchAddress + ". Phone:" + _branchContactNumber;;

            ((TextObject)cr.ReportDefinition.Sections[2].ReportObjects["txtfromDate"]).Text = dt_FromDate.Value.Date.ToShortDateString();
            ((TextObject)cr.ReportDefinition.Sections[2].ReportObjects["txtto"]).Text       = dt_ToDate.Value.Date.ToShortDateString();
            ((TextObject)cr.ReportDefinition.Sections[2].ReportObjects["Sorting"]).Text     = sorting;
            objreportviewer.crvReportViewer.ReportSource = cr;
            objreportviewer.Show();
        }