Tuesday, November 27, 2012

Image in RDLC

Show External Images In RDLC
This post is about "How to show images in RDLC?". 
Step 1 : In RDLC just drag n drop image from toolbox.
Step 2 : In property of Image change source to external and in value specify the path of image.
In path u have to put  "file:/// " before the absolute path for local resources and for Server "http://" .
Step 3 : In Code Behind we have to enable EnableExternalImages.
            ReportViewer1.LocalReport.EnableExternalImages = true;
Now, Run the report. If Image is not visible than we have to follow step 4.
Step 4 : We may need to bypass proxy settings to allow the external image to appear. Add following setting to web.config file.
 <system.net>
        <defaultProxy>
            <proxy proxyaddress ="http://proxyservername:80" usesystemdefault="False" bypassonlocal="True">    </proxy>
        </defaultProxy>
    </system.net>

2 comments:

  1. can you put an complete article on creating a basic rdlc report with a dataset & stored procedures(in C#.Net).With step by step from begining to end. I'm new to rdlc reporting & feel like all messed up. I think you can help me
    Thanx in advance...

    P.S.
    I've found lot of complex articles about rdlc. bt none of them was much helpful.

    ReplyDelete
    Replies
    1. Its already here.Read This One -->
      http://dotnetknowledgebox.blogspot.in/2012/01/matrix-report-via-rdlc.html

      Delete