This article does not contain any new things. It just summarizes some skills of rdlc development at ordinary times and is only for reference when developing rdlc reports.
1. the table and list controls cannot be placed in the pageheader area. To Display Dynamic information, you can reference the control value in the body. However, note that the body control can only be displayed on a certain page, when you flip to another page number, the control value is blank.
2. When referencing an external image, you can use the code to add the image. The method is to add an external reference: = file: // +... to the value of the image control, and set the enableexternalimages attribute to true.
3. the filter expression of the table control is very strange. If the field attribute in the dataset table is int, the filter expression often reports an error. The lazy way is to change the field attribute in the dataset table to the string type, in this way, the world is peaceful.
4. The code for displaying page numbers is: = "page" + globals. pagenumber. tostring () & "of" & globals. totalpages. tostring ().
5. In exported PDF files, Chinese characters are displayed as garbled characters, which are often caused by font settings. You can solve the problem by setting the font to Chinese characters.
6. Report parameters can be used as follows:
Reportparameter rp1 = new reportparameter ("Notes", "ABC ");
This. reportviewer1.localreport. setparameters (New reportparameter [] {RP1 });
7. When printing a blank page, it is caused by the body width> pagewidth-marginleft-marginright, as long as the width of the body is reduced to less than pagewidth.