Trying to download a crystal report in a pdf form when the user clicks the button only works on the Visual Studio but fails to work on IIS server on the published version

Lerato_Dev 1 Reputation point
2021-12-17T07:28:42.787+00:00

private static ReportDocument PrepareDetailedTaskReport(int taskId, int year, string month, string taskName,
string employeeName, string clientName, string status, string priority, bool includeImages)
{

            ReportDocument reportDocument = new ReportDocument();

            new GetTaskDetailedReportTableAdapter().Fill(ds.GetTaskDetailedReport, taskId, year, month, taskName,
               employeeName, clientName, status, priority);
            new TaskTrackingSystem.Data.DataSet.TrackingSoftwareTableAdapters.LogoTableAdapter().Fill(ds.Logo);
            new EscalationsTableAdapter().Fill(ds.Escalations);
            new SelectTaskLogTableAdapter().Fill(ds.SelectTaskLog);
            new TaskImagesAllTableAdapter().Fill(ds.TaskImagesAll);

            string reportLocation = ConfigurationManager.AppSettings["TaskInfoReport"];


            reportDocument.Load(reportLocation);

            reportDocument.SetDataSource(ds);

        return

                reportDocument;



    }

This is my path in the web.config file

<add key="TaskInfoReport" value="C:\Users\hp\Desktop\Developer1-06042021\Desktop\Given Motswagae\OnlineOB_Lite_v2.0.1.2\TaskTrackingSystem\Task Management\Task\TaskInfoReport.rpt"/>

Internet Information Services
{count} votes