public string XrayIssueReportPrint(Entities.StockReport stock)
        {
            var report       = new BuidReport();
            var reportEntity = new Entities.Report();
            var reportName   = string.Empty;
            var folderName   = string.Empty;
            //var serverPath = HttpContext.Current.Server.MapPath("../POS/");

            var parameters = new ArrayList();

            parameters.Add(stock.FromDate);
            parameters.Add(stock.ToDate);


            folderName = "StockReport";
            reportName = "X-RayIssueReport.rpt";


            var serverPath = HttpContext.Current.Server.MapPath("/HealthScreeningApp/");

            reportEntity.DirectoryPath = serverPath + "ApplicationFiles/" + folderName + "/";

            reportEntity.ReportPath      = serverPath + "Reports/" + reportName;
            reportEntity.Parameters      = parameters;
            reportEntity.FileStoragePath = reportEntity.DirectoryPath + Convert.ToString("XrayIssueReport") + ".pdf";

            return(report.GenerateReport(reportEntity, CrystalDecisions.Shared.ExportFormatType.PortableDocFormat));
        }
        public string generateReport(Entities.medicinesDispense med)
        {
            var report       = new BuidReport();
            var reportEntity = new Entities.Report();
            var reportName   = string.Empty;
            var folderName   = string.Empty;
            //var serverPath = HttpContext.Current.Server.MapPath("../POS/");

            var parameters = new ArrayList();

            parameters.Add(med.FromDate);
            parameters.Add(med.ToDate);

            folderName = "PreEmploymentDetails";
            reportName = "medicinesDispenseReport.rpt";


            var serverPath = HttpContext.Current.Server.MapPath("/HealthScreeningApp/");

            reportEntity.DirectoryPath = serverPath + "ApplicationFiles/" + folderName + "/";

            reportEntity.ReportPath      = serverPath + "Reports/" + reportName;
            reportEntity.Parameters      = parameters;
            reportEntity.FileStoragePath = reportEntity.DirectoryPath + Convert.ToString("MedicinesDispense") + ".pdf";

            return(report.GenerateReport(reportEntity, CrystalDecisions.Shared.ExportFormatType.PortableDocFormat));
        }
Пример #3
0
        public string generateReport(Entities.PreEmploymentDetails preEmploymentDetails)
        {
            var report       = new BuidReport();
            var reportEntity = new Entities.Report();
            var reportName   = string.Empty;
            var folderName   = string.Empty;
            //var serverPath = HttpContext.Current.Server.MapPath("../POS/");
            var fileName = "No Records";

            try
            {
                var parameters = new ArrayList();

                parameters.Add(preEmploymentDetails.PreEmploymentId);

                folderName = "PreEmploymentDetails";
                reportName = "PreEmploymentDetails.rpt";

                if (preEmploymentDetails.PreEmploymentOrHealthCheckup.ToLower() == "h")
                {
                    folderName = "HealthCheckupDetails";
                    reportName = "HealthCheckupDetails.rpt";
                }

                ////LogWriter logWriter = new LogWriter(fileName);

                ////LogWriter //logWriter = new LogWriter("Inside Generate REport Method");

                //LogWriter logWriter = new LogWriter(folderName + ", " + reportName + ", " + preEmploymentDetails.PreEmploymentId.ToString() + ", " + "," + preEmploymentDetails.PreEmploymentOrHealthCheckup);

                var serverPath = HttpContext.Current.Server.MapPath("/HealthScreeningApp/");
                reportEntity.DirectoryPath = serverPath + "ApplicationFiles/" + folderName + "/";

                reportEntity.ReportPath      = serverPath + "Reports/" + reportName;
                reportEntity.Parameters      = parameters;
                reportEntity.FileStoragePath = reportEntity.DirectoryPath + Convert.ToString(preEmploymentDetails.PreEmploymentCodeNo) + ".pdf";

                //logWriter = new LogWriter(folderName + ", " + reportName + ", " + reportEntity.DirectoryPath + ", " + "," + reportEntity.FileStoragePath);

                fileName = report.GenerateReport(reportEntity, CrystalDecisions.Shared.ExportFormatType.PortableDocFormat);
            }
            catch (Exception ex)
            {
                LogWriter logWriter = new LogWriter("Inside Generate REport Method");

                logWriter = new LogWriter(ex.Message);
            }

            return(fileName);
        }
Пример #4
0
        public string generateReport(Entities.Precautions pre)
        {
            var report       = new BuidReport();
            var reportEntity = new Entities.Report();
            var reportName   = string.Empty;
            var folderName   = string.Empty;
            //var serverPath = HttpContext.Current.Server.MapPath("../POS/");

            var parameters = new ArrayList();

            parameters.Add(pre.DrugDispenseId);

            reportName = "Precaution_Reports.rpt";

            var serverPath = HttpContext.Current.Server.MapPath("/HealthScreeningApp/");

            reportEntity.DirectoryPath = serverPath + "ApplicationFiles/PatientNo/";

            reportEntity.ReportPath      = serverPath + "Reports/" + reportName;
            reportEntity.Parameters      = parameters;
            reportEntity.FileStoragePath = reportEntity.DirectoryPath + "PatientNo_" + Convert.ToString(pre.DrugDispenseId) + ".pdf";

            return(report.GenerateReport(reportEntity, CrystalDecisions.Shared.ExportFormatType.PortableDocFormat));
        }