none
Image with an External Source do not appears in the report RRS feed

  • Question

  • Hello

    I am using the LocalReport class to generate pdf reports,
    I design a report that includes a Image with an External Source, when i call the render function the generated report file appears without the image.


    Me.ReportViewer1.LocalReport.EnableExternalImages = True
    Dim pdfContent As Byte() = Me.ReportViewer1.LocalReport.Render("pdf", Nothing, Nothing, Nothing, "pdf", Nothing, Nothing)


    what i can do?
    Friday, October 26, 2007 9:09 PM

Answers

  • I don't think that will work.  The report doesn't know anything about the shorthand ~ that ASP.NET uses.

     

    Try parameterizing your report with some information about your server and the location of these images; you can do this either http:// style or use MapPath on the server to get a file://... path.  Now you can write an expression like this:

     

    Code Block


    =Parameters!ServerLoc.Value & "/REPORTES/coffe.mp"

     

     

     

    >L<

     

    Monday, October 29, 2007 4:07 PM

All replies

  • Well that's working for me... admittedly I have not used the "pdf" value in the 5th argument and I have set the EnableExternalImages earlier in the "life" of the control...

     

    I don't see why the first thing should make any difference.  But have you tried setting the property earlier, perhaps in the property sheet if that is how you are loading the RDLC into the LocalReport?

     

    No, I changed that, and it is still working...

     

    Well, maybe it's something about how the filename is referenced in the Image's value property.  What does yours look like?

     

    >L<

    Saturday, October 27, 2007 5:24 AM
  • reference the filename in the image's value property in this way
    ="~/REPORTES/coffe.bmp"

    is this way ok?

    thanks
    Monday, October 29, 2007 2:09 PM
  • I don't think that will work.  The report doesn't know anything about the shorthand ~ that ASP.NET uses.

     

    Try parameterizing your report with some information about your server and the location of these images; you can do this either http:// style or use MapPath on the server to get a file://... path.  Now you can write an expression like this:

     

    Code Block


    =Parameters!ServerLoc.Value & "/REPORTES/coffe.mp"

     

     

     

    >L<

     

    Monday, October 29, 2007 4:07 PM