rdlc打印不带预览 [英] rdlc print without preview

查看:122
本文介绍了rdlc打印不带预览的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在没有打印对话框的情况下打印报表查看器,对她没有帮助

I want to print report viewer without print dialog any help her

推荐答案

对不起,我对rdlc报表查看器不熟悉.这应该可以帮助您 http://msdn.microsoft.com/en-us/library/ms252091.aspx [^ ]

这就是我过去所做的事情.不知道您是否正在使用打印文档.
(我刚刚从VB.NET进行了快速转换,因此希望语法正确无误)

关键是StandardPrintController.

Sorry I wasn''t familiar with rdlc report viewer. This should help you http://msdn.microsoft.com/en-us/library/ms252091.aspx[^]

This is how I have done it in the past. Not sure if you are using print document or not.
(I just quickly converted from VB.NET so hopefully I got the syntax all correct)

The key is the StandardPrintController.

PrintDocument1 = new PrintDocument();
PrintDocument1.DocumentName = "MyPrint";
PrintDocument1.PrinterSettings = ps;

StandardPrintController silentController = new StandardPrintController();
PrintDocument1.PrintController = silentController;

PrintDocument1.DefaultPageSettings.Margins.Top = 20;
PrintDocument1.DefaultPageSettings.Margins.Left = 20;
PrintDocument1.DefaultPageSettings.Margins.Right = 20;
PrintDocument1.DefaultPageSettings.Margins.Bottom = 20;

PrintDocument1.Print();


这篇关于rdlc打印不带预览的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆