【问题标题】:How to print rdlc report without Report Viewer or any print dialog in C# .Net如何在没有报告查看器或 C# .Net 中的任何打印对话框的情况下打印 rdlc 报告
【发布时间】:2017-06-22 21:26:16
【问题描述】:
can i print .rdlc report without using report viewer or any print preview dialog Box?

-我想在没有打印预览或打印机对话框的情况下直接打印。 -请指导我,我是 C# 这类工作的新手。 - 如果有人有,请提供我这项工作的代码。

【问题讨论】:

  • 水晶报告还是RDLC报告?
  • @Vicky S -Rdlc 报告。
  • 上面的链接会将报告打印到 .xps 文件并提示您输入文件位置。如果您指定打印设备的名称,它将直接将报告打印到该设备。我要直接打印

标签: c#


【解决方案1】:
【解决方案2】:
LocalReport report = new LocalReport();
            report.ReportEmbeddedResource = "Your.Reports.Path.rdlc";
            report.DataSources.Add(new ReportDataSource("DataSet1", getYourDatasource()));
            report.PrintToPrinter();

请参考链接How to directly print rdlc report without showing PrintDialog() in C#?

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2014-03-14
    • 1970-01-01
    • 2017-11-11
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多