Show image on RDLC report from database by image path

前端 未结 3 938
自闭症患者
自闭症患者 2021-01-22 21:42

The image path is stored in the SQL Server 2008 database. On my RDLC report, I have a image field. I have set this field to get the image path from the database column in the da

3条回答
  •  一生所求
    2021-01-22 22:29

    reportViewer.LocalReport.ReportPath = @"Report Path";                                    
    reportViewer.LocalReport.EnableExternalImages = true;                                
    ReportParameter parameter = new ReportParameter("ImagePath", imagePath);              
    ReportParameter[] param = new ReportParameter[1];                                      
    param[0] = parameter;                                                                 
    reportViewer.LocalReport.SetParameters(param);                                        
    reportViewer.RefreshReport();  
    

    http://www.aspsnippets.com/Articles/Dynamically-add-and-display-external-Image-in-RDLC-Report-from-code-behind-in-ASPNet.aspx

提交回复
热议问题