开发者

Passing file path to value field in SSRS

开发者 https://www.devze.com 2023-03-21 07:14 出处:网络
I am trying开发者_如何学C to pass the path of my picture through a parameter to the Value filed of image box. The code is

I am trying开发者_如何学C to pass the path of my picture through a parameter to the Value filed of image box. The code is

File: & Parameters!Pct.Value

Pct is a parameter contains the path of my jpg file (string type).

But report is not showing anything...... Please note when I put File:D:\TV.jpg in value, it works but when I pass it through parameter, then I do not get anything

Please advise.


But report is not showing anything......

Is this in Report Designer or Report Server? If you try to view the image after the report has been published, you need to set the Unattended Execution Account. This account should have permission to access the image. You can find this setting in Reporting Services Configuration Manager. HTH.


The trick is file://

Dim vrPicPath As String = "file://D:\TV1.jpg" 'or something from the database
    Dim pic As New ReportParameter("Pic", vrPicPath)
    Me.ReportViewer1.LocalReport.SetParameters(New ReportParameter() {pic})

Now you can pass the value to the value filed of image box simply writing in expression

=Parameters!Pic.Value
0

精彩评论

暂无评论...
验证码 换一张
取 消