How to show images on an RDLC report

前端 未结 2 1883
悲哀的现实
悲哀的现实 2021-02-15 00:44

I have an RDLC report and would like one of the columns in a table on this report to display images. The datasource for my report is a class that has a property called Image of

2条回答
  •  夕颜
    夕颜 (楼主)
    2021-02-15 01:04

    Firstly, you take a new Form in your project on Load event you Wright this line below:

    reportViewer1.LocalReport.EnableExternalImages = true; 
    

    After that take reportViewer on that page and set smart tag of that, choose Design a new report and take an image control on it from ToolBox, set its property

    Source = External Value = file:\D:Images\Sunset.jpg 
    

    Note: Image(Sunset.jpg) saved in Images folder on D drive. You changed it according to your requirement.

提交回复
热议问题