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

            rpt.Site = this.Site;
            return(rpt);
        }
Ejemplo n.º 2
0
        internal void PrintTISDetailsReport(DataSet dataSet, DateTime startDate, DateTime endDate, int noOfRecords)
        {
            try
            {
                string sVersion, sSiteName;
                var rTISVoucherReport = new TISVoucherDetailsReport();

                rTISVoucherReport.SetDataSource(dataSet.Tables[0]);
                GetVersion_SiteName(out  sVersion, out  sSiteName);

                rTISVoucherReport.SetParameterValue("SiteName", sSiteName);
                rTISVoucherReport.SetParameterValue("SiteCode", Settings.SiteCode);
                rTISVoucherReport.SetParameterValue("ReportStartDate", startDate);
                rTISVoucherReport.SetParameterValue("ReportEndDate", endDate);
                rTISVoucherReport.SetParameterValue("@StartDate", startDate);
                rTISVoucherReport.SetParameterValue("@EndDate", endDate);
                rTISVoucherReport.SetParameterValue("@NoOfRecords", noOfRecords);
                rTISVoucherReport.SetParameterValue("BMC Version", sVersion);
                rTISVoucherReport.SetParameterValue("CurrencyCulture", ExtensionMethods.CurrentCurrenyCulture);
                rTISVoucherReport.SetParameterValue("CurrencySymbol", ExtensionMethods.CurrentCurrenyCulture.GetCurrencySymbol());
                rTISVoucherReport.SetParameterValue("DateCulture", ExtensionMethods.CurrentDateCulture);

                crystalReportViewer.ReportSource = rTISVoucherReport;
                crystalReportViewer.Show();
                //crystalReportViewer.PrintReport();
            }
            catch (Exception ex)
            {
                ExceptionManager.Publish(ex);
            }
        }
 public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport() {
     TISVoucherDetailsReport rpt = new TISVoucherDetailsReport();
     rpt.Site = this.Site;
     return rpt;
 }