none
passing values to a parameter in a Rdcl file RRS feed

  • Question

  • Hi all

    I Have a report in which I would like the user to specify their own logo.

    In this report I put an image box named Logo  the select image source  is set to 

    EXTERNAL and in the use this image I have =Parameters!LogoPath.Value.

    I have tried this example but all I get is a red X in the Image box.

      Private Sub btn()
            Dim param(0) As ReportParameter
            param(0) = New ReportParameter("LogoPath","C:\CFI\logo.jpg")
            Me.ReportViewer1.LocalReport.SetParameters(param)
        End Sub
    



    JrCharlie
    Thursday, November 17, 2011 4:53 AM

Answers

  • Hi,

    Do the blue highlighted change and your code will work fine:

    Private Sub btn()
            Dim param(0) As ReportParameter
            param(0) = New ReportParameter("LogoPath","file:\\C:\CFI\logo.jpg")
            Me.ReportViewer1.LocalReport.SetParameters(param)
        End Sub


    Aftab Ansari
    • Marked as answer by JrCharlie Friday, November 18, 2011 12:03 AM
    Thursday, November 17, 2011 6:56 AM

All replies

  • Hi,

    Do the blue highlighted change and your code will work fine:

    Private Sub btn()
            Dim param(0) As ReportParameter
            param(0) = New ReportParameter("LogoPath","file:\\C:\CFI\logo.jpg")
            Me.ReportViewer1.LocalReport.SetParameters(param)
        End Sub


    Aftab Ansari
    • Marked as answer by JrCharlie Friday, November 18, 2011 12:03 AM
    Thursday, November 17, 2011 6:56 AM
  • Thank you very much Aftab

    I worked.

     


    JrCharlie
    Friday, November 18, 2011 12:05 AM