【发布时间】:2015-06-02 13:46:35
【问题描述】:
我正在使用 Telerik 报告。我想在呈现此报告时将打印选项添加到对话框中。
有什么方法可以在对话框中添加打印选项。
{
Telerik.Reporting.Processing.ReportProcessor reportProcessor =
new Telerik.Reporting.Processing.ReportProcessor();
DTSReport DTSRpt = new DTSReport();
DTSRpt.ReportParameters["PendingId"].Value = id;
InstanceReportSource reportSource = new InstanceReportSource();
reportSource.ReportDocument = DTSRpt;
RenderingResult renderingResult =
reportProcessor.RenderReport("PDF", reportSource, null);
MemoryStream ms = new MemoryStream();
ms.Write(renderingResult.DocumentBytes, 0, renderingResult.DocumentBytes.Length);
ms.Flush();
FileContentResult result = new FileContentResult(ms.GetBuffer(), renderingResult.MimeType);
result.FileDownloadName = String.Format("DTS-{0}.pdf", id);
return result;
}
【问题讨论】:
-
这是网页还是桌面?
-
这是一个网络应用程序..
标签: c# web telerik-reporting