点击choose report data 然后全部选中即可
主要代码如下:
Report report = new Report(); var assembly = System.Reflection.Assembly.GetExecutingAssembly(); string path = Path.Combine(Path.GetDirectoryName(assembly.Location),"Report", "Print1.frx"); report.Load(path); RequestParams requestParams = obj as RequestParams; List<RequestParams> requestParamsList = new List<RequestParams>(); requestParamsList.Add(requestParams); report.RegisterData(requestParamsList, "requestParamsList"); report.PrintSettings.ShowDialog = false; report.PrintSettings.Printer = requestParams.printer_name; report.Print(); report.Dispose();