Click here to Skip to main content
16,016,527 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
i have web application asp.net button show sap crystal Report i can see all field from database but field image-path no display inside Report

What I have tried:

private void report()
    {
        if (!string.IsNullOrEmpty(Request.QueryString["pId"]) && int.TryParse(Request.QueryString["pId"], out checkInt))
        {
            a.UserPrint(lbluser.Text, checkInt);
            a.Updateprint(checkInt);

            DataTable all = a.checkstatusMaintenance(checkInt);

            if (all.Rows.Count > 0)
            {
                string path = all.Rows[0]["signature"].ToString();

                CrystalDecisions.CrystalReports.Engine.ReportClass rd = new CrystalDecisions.CrystalReports.Engine.ReportClass();

                rd.FileName = Server.MapPath("~/Reports/RecvUnit.rpt");

                rd.RecordSelectionFormula = "{Unit_Recv.ContractNumber} = " + checkInt;
                
                rd.SetParameterValue("imgurl", Server.MapPath(@"~/CanvasImages/"+ path));
                CrystalReportViewer2.ReportSource = rd;
                CrystalReportViewer2.RefreshReport();
                CrystalReportViewer2.DataBind();
            }

        }
Posted
Comments
Matias Lopez 11-Sep-18 13:46pm    
First, do you have the correct Path? And the application have permissions to access there?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900