简体   繁体   English

通过 id 从网络共享/共享点加载的 SSRS 图像

[英]SSRS images loaded by id from a network share/ sharepoint

Is there a possibility to display an image from a network share/sharepoint in a SSRS report based on the entry ID that is being queried?是否可以根据正在查询的条目 ID 在 SSRS 报告中显示来自网络共享/共享点的图像?

I know that it is possible to have an image from the database but is it possible from an external source like shared drive/ sharepoint?我知道可以从数据库中获取图像,但是否可以从共享驱动器/共享点等外部来源获取图像?

Example:例子:

  1. I have network shared folder "images".我有网络共享文件夹“图像”。 In it the images are called 1.jpg, 2.jpg etc.在其中,图像被称为 1.jpg、2.jpg 等。
  2. In the SSRS report I query a database that returns results with ID 1, 2, 3 etc.在 SSRS 报告中,我查询了一个返回 ID 为 1、2、3 等结果的数据库。
  3. Based on the queried ID, images should be displayed accordingly - ID 1 = 1.jpg根据查询的ID,相应地显示图像-ID 1 = 1.jpg

Using an expression that checks if ID 1 then display 1.jpg wouldn't be a solution I think as there could be thousands of IDs, unless there's a way to write the expression to be dynamic, etc if x ID, then display //path/x.jpg.我认为使用检查 ID 1 是否显示 1.jpg 的表达式不是解决方案,因为可能有数千个 ID,除非有办法将表达式编写为动态等,如果 x ID,则显示 //路径/x.jpg。

Thanks!谢谢!

You can set the value property of the image control to an expression, for example...您可以将图像控件的value属性设置为表达式,例如...

="\\myFileServer\myFolder\image" & Fields!FileNumber.Value & ".png"

Would return = "\\myFileServer\myFolder\image1.png" etc.将返回 = "\\myFileServer\myFolder\image1.png"等。

Be aware the the path must be visible from the server running SSRS (and also by the service account / user)请注意,必须从运行 SSRS 的服务器(以及服务帐户/用户)可以看到路径

Start by adding a textbox with the path expression as above to make sure you are getting the values you expect and then set the image property once you are happy with the results.首先添加一个带有上述路径表达式的文本框,以确保您获得预期的值,然后在您对结果满意后设置图像属性。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM