Summary at work. I hope I will not commit any further mistakes in the future !!!
In Windows Form Design
Prerequisites: (The following controls must be used)
CodeSetting: This. reportviewer1.localreport. enableexternalimages = true; // The local image displayed in the rdlc report must be set (disabled by default)
The following method needs to be performed on the rdlc design.
**************************************** **************************************** ******************
Method 1. Use the image control (the effect can be seen only after running)
The value of the image must be in the following format ("file: //" or "file)
= "File: // D: \ baidu_logo.gif"
Note: folders or file names that cannot contain special characters (such as #, Parentheses, and Chinese characters) = "file: // D: \ Project (C #) \ baidu_logo.gif"
Summary:
It may take a long time to load a report, depending on the size of the loaded image (to control the image size)
Flexible image modification (you can directly replace the original image if you do not like it.Program)
Method 2. Embedded display (reference http://www.cnblogs.com/jack86514/archive/2009/10/17/1584862.html)
Follow the steps below:
Step 1: Embed images on rdlc
Step 2: add the image you need
Step 3: add controls
(The default name is image1)
Step 4: Modify settings
Source is external (external) by default, but since the embedded image is displayed now, all changes to embedded (embedded)
Effect:
Summary:
The embedded image method is relatively easy but not flexible enough (you do not like the original image, you cannot directly replace it, you need to change the Program), because the image has become binary and saved in *. in the rdlc file, the report size is increased (the image size is increased to the report). If you only make reports similar to invoices, we strongly recommend that you, if it is a report of employee information, it is strongly not recommended.
Original size (left), embedded size (right)