I'm going to move all my essays from another blog here. The following is one of the articles. The RTM version of VS2005 should have been used at that time. I don’t know if this problem still exists.
In a recent project, I needed to draw a line chart based on data, so I wanted to use the report tool that comes with VS2005 to do it. It went smoothly at first, but then I found that the charts drawn on the page could not change with the parameter changes. I spent most of the afternoon struggling with this, and it was really a mess. Finally, I found that there was a lack of call to ReportViewer.LocalReport.Refresh. Overtime work made my head confused. A lot...
But what I still can't figure out is the problems that occurred when the system was released. I directly use the publish function of VS2005 to publish the system. It uses a pre-compiled method. I removed the "Allow this precompiled site to be updatable" option. After publishing to the server, the report cannot be displayed. After some tests, I found that the reason may be The report file path cannot be found. For this reason, I changed the ReportPath in the aspx page to a relative address, but it still didn't work. Later, I removed the ReportPath attribute in the aspx file and used the Server.MapPath method in the cs file, but the result still didn't work. There is really no choice but to select the "Allow this precompiled site to be updatable" option, publish, and then the report file on the server will be available. Selecting this option, I think it may have a slight impact on performance, but the progress is very close at present, and it is only That's it for now. If I find the answer to this question in the future, I will add it here.
[2006-2-13] Edit:
It seems that the reason may be found. After pre-compilation of publish, the report file becomes a "marker" file like other aspx files after being published to the server. As long as the original The report file can overwrite this "marker" file. Maybe this is also a problem with VS2005?
http://www.cnblogs.com/Ricky81317/archive/2007/01/10/616974.html