SSRS将URL的Base64字符串或字节数组显示为图像

问题描述 投票:0回答:1

我有一个wevservice,它以Base64字符串或字节数组的形式返回图像,我需要在SSRS中将其显示为图像。不知道该怎么做。

我尝试在图像属性中使用表达式:

=System.Convert.FromBase64String("http://localhost:5460/api/Report/GetImage")

但是那不起作用。如何从URL获取字符串或数组,然后将其显示为图像?

我也尝试过代码块,但是当我尝试时

Dim hwr As System.Net.HttpWebRequest
hwr = System.Net.WebRequest.Create("http://localhost:5460/api/Report/GetImage")

我收到错误:

Severity    Code    Description Project File    Line    Suppression State
Warning     [rsRuntimeErrorInExpression] The Value expression for the textrun 'Textbox2.Paragraphs[0].TextRuns[0]' contains an error: 
Insufficient permissions for setting the configuration property 'maximumErrorResponseLength'. (c:\program files (x86)\microsoft visual studio\2017\sql\common7\ide\commonextensions\microsoft\ssrs\PreviewProcessingService.exe.Config line 42)     C:\Users\Desktop\REP90011\REP90011.rdl  0   

这是在我的本地计算机上,而不是在SSRS服务器上或通过IIS。只需通过VS 2017中的预览窗格即可。

reporting-services ssrs-2012
1个回答
0
投票

问题是,我需要允许桌面上的RSPreviewPolicy.config文件中的权限为'FullTrust'而不是'Nothing',才能使用'System.Net.WebRequest.Create'。

© www.soinside.com 2019 - 2024. All rights reserved.