16282222 发表于 2016-1-30 16:58:00

ActiveReports 10 打印问题

你好,我在aspx页面做了一个按钮传递参数到reports.rdlx表然后打印表格,
打印过程不显示表格,不显示打印对话框,
我试了社区很多方法都无法实现,用flashviewer总是会出打印对话框,用Document.Printer.Print()方法打印出来是空白,没有内容。
请问怎么解决??

16282222 发表于 2016-2-1 02:54:00

以下代码打印出来是空白页
protected void Button1_Click(object sender, EventArgs e)
      {
            string file_name = @"E:\Visual Studio 2015\WebApplication1\WebApplication1\PageReport1.rdlx";
            GrapeCity.ActiveReports.PageReport myReport = new GrapeCity.ActiveReports.PageReport(new System.IO.FileInfo(file_name));
            GrapeCity.ActiveReports.Document.PageDocument myDocument = new GrapeCity.ActiveReports.Document.PageDocument(myReport);
            myDocument.Printer.PrinterSettings.PrinterName = "Microsoft XPS Document Writer";
            myReport.Document.Printer.Print();
}

Lenka.Guo 发表于 2016-2-1 13:19:00

您好,
根据您的描述 需要从后台为报表传递参数, 但是您的代码中未显示为报表参数赋值, 怀疑是参数未传递成功导致的。

16282222 发表于 2016-2-1 14:09:00

回复 3楼Lenka.Guo的帖子

传参过程我省略了,而且没设置参数
用flashviwer可以打印,但是flashviwer会弹出打印对话框.

16282222 发表于 2016-2-1 14:17:00

Lenka.Guo 发表于 2016-2-1 17:03:00

抱歉,通过多次实验, Web 端打印无法去掉打印对话框,
Web 端只有FlashViewer 和HTML5Viewer 支持直接打印,且无法去掉打印对话框,这是Web 打印的一个限制。

Lenka.Guo 发表于 2016-2-15 14:34:00

回复 5楼16282222的帖子



为了给你提供更优质的服务,请对本次服务进行评分。我们会认真对待你提出的宝贵意见,谢谢

http://gcdn.gcpowertools.com.cn/attachment.aspx?attachmentid=10062
页: [1]
查看完整版本: ActiveReports 10 打印问题