这是我从ReportViewer以PDF格式导出报告的方式:
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();
是否可以在Black and White
仅导出此报告?
答案 0 :(得分:0)
如果有人提出这个问题,我会发布我的解决方案。
我在rdlc报告IsPrintType
中再添加一个参数。这是布尔参数。在SSRS中,您可以将报告设置为仅黑白。单击打印按钮reload report with this parameter > print report using code above > reload report back with color
如果需要代码示例,请告诉我