簡體   English   中英

以黑白PDF格式從Reportviewer渲染LocalReport

[英]Render LocalReport from Reportviewer in Black and White PDF

這是我從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();

有什么辦法可以僅以Black and White導出此報告?

如果有人有這個問題,我將發布解決方案。

我在rdlc報告IsPrintType添加了另一個參數。 這是布爾參數。 在SSRS中,您可以將報告設置為僅黑白。 當您單擊打印按鈕時,請reload report with this parameter > print report using code above > reload report back with color

如果需要代碼示例,請告訴我

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM