[英]How to set Page Scaling to none while exporting crystal report to PDF
[英]How do I set other name instead of default pdf file name in report viewer while exporting it?
我在我的一個網站頁面上使用了報告查看器,它工作正常,但是當我進行導出時,導出的文件名為 report4.pdf,但我不希望我想給出其他名稱而不是 report4.pdf . 我該怎么做,請幫忙。
ReportViewer1.LocalReport.DisplayName = "Your Other Name Goes Here";
它僅適用於 ExportDialog 而不適用於 PrintDialog。
它只是一行代碼。 就是這樣。 RptViewer.ServerReport.DisplayName = "你的文件名在這里";
frmReportViewerX.reportViewer1.LocalReport.DisplayName = "報告名稱";
我希望您正在使用 SSRS 報告。
導出選項采用 SSRS 文件名來創建 pdf 文件。
例如:如果您有 SSRS 文件 somereport.rdl 那么當您導出報告時,pdf 文件名變為 somereport.pdf
您可以按如下方式更改導出文件名
添加用於下載和編寫代碼以呈現報告並寫入流的按鈕。 就像是:
byte[] bytes = ReportViewer1.ServerReport.Render(filetype, null, out mimeType, out encoding, out extension, out streamids, out warnings);
context.Response.BinaryWrite(bytes);
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.