When VB6 is used for report generation, it uses a third-party grid ++ report and is now transferred. net, with the built-in rdlc report, refer to the tutorial of Cui, strictly follow his practice step by step, I tried to avoid several points of attention in the article, after several attempts, the system prompts that the report is undefined. Because the report prompt information is not detailed, I don't know where the problem is. I thought it was a problem of passing parameters. Then I simply removed all the parameters, but the problem still exists.
The cause is that the report path is loaded. An absolute path is added to load the report:
Reportviewer1.localreport. reportpath = "F: \ Project project \ IDC Charging System (net individual edition) \ IDC charging individual implementation \ IDC charging individual edition \ ui_reportofday.rdlc"
Loaded successfully.
The program must use a relative path. You can use application. startuppath obtains the file path of the executable program, VB. the default program running path is the bin directory under the project folder, but the rdlc file of the report is under the root directory. The solution is to copy the rdlc file of the report to the bin directory .. I didn't come up with a good solution, but I ran it perfectly now ~