【问题标题】:How to show images from database in a rdlc report in a windows form application如何在 Windows 窗体应用程序的 rdlc 报告中显示数据库中的图像
【发布时间】:2021-03-19 10:01:56
【问题描述】:

在 Windows 窗体应用程序中,我试图在 rdlc 报告中显示数据库中的图像。在数据库中,我存储了图像路径,在 rdlc 报告中,我使用了图像,源为“数据库”,MIME 类型为“image/png”,但运行报告后显示红十字签名图像而不是原始图像。

我已经验证了图像路径,并且在 Windows 窗体中,图像以完全相同的路径正确显示。

【问题讨论】:

    标签: c# windows forms rdlc


    【解决方案1】:

    我没有将图像源选择为“数据库”,而是将其设置为“External”并启用了_reportViewer.LocalReport.EnableExternalImages = true;,并在图像路径之前使用了file:///,它对我有用。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2020-12-06
      • 1970-01-01
      • 2013-05-29
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2013-04-11
      • 1970-01-01
      相关资源
      最近更新 更多