Exemplo n.º 1
0
        /// <summary>
        /// Binding data string to report rpt and show on report viewer
        /// </summary>
        private ReportDocument ShowReport(Crystal data)
        {
            var    reportPath = System.Web.Hosting.HostingEnvironment.MapPath("~/Reports/");
            string filePath   = reportPath + data.ReportName;

            if (File.Exists(filePath))
            {
                ReportDocument rpt = new ReportDocument();
                rpt.Load(reportPath + data.ReportName);
                rpt.Init(data);
                return(rpt);
            }
            return(null);
        }