C# 以黑白PDF格式从Reportviewer呈现本地报告

C# 以黑白PDF格式从Reportviewer呈现本地报告,c#,asp.net,pdf,reportviewer,localreport,C#,Asp.net,Pdf,Reportviewer,Localreport,以下是我如何以PDF格式从ReportViewer导出报告: Warning[] warnings; string[] streamids; string mimeType; string encoding; string extension; byte[] myBytes; string reportName = hfReportName.Value; myBytes = rvReport.LocalReport.Render("PDF", null, out mimeType, out e

以下是我如何以PDF格式从ReportViewer导出报告:

Warning[] warnings;
string[] streamids;
string mimeType;
string encoding;
string extension;
byte[] myBytes;
string reportName = hfReportName.Value;

myBytes = rvReport.LocalReport.Render("PDF", null, out mimeType, out encoding, out extension, out streamids, out warnings);

Response.Buffer = true;
Response.Clear();  
Response.ContentType = mimeType;
Response.AddHeader("content-disposition", "attachment; filename=" + reportName + "_" + ddlPracGroup.SelectedItem + "." + extension);
Response.BinaryWrite(myBytes);
Response.Flush();

是否可以仅以黑白形式导出此报告?

如果有人有此问题,我将发布我的解决方案

我在rdlc报告IsPrintType中又添加了一个参数。这是布尔参数。在SSRS中,您可以将报告设置为仅黑白。单击打印按钮时,使用此参数重新加载报告>使用上面的代码打印报告>使用颜色重新加载报告


如果需要代码示例,请告诉我

如何将报告设置为黑白?您在哪里设置iPrintType?