怎麼樣做到直接打印?

iori_guojun 2006-05-22 11:44:48
水晶報表裡的我沒用CryRptView的自帶的打印按鈕。自己寫了個按鈕。
怎麼樣做到點擊此按鈕後,出現的象IE瀏覽器的文件/打印的對話框,謝謝!!
...全文
268 4 打赏 收藏 转发到动态 举报
写回复
用AI写文章
4 条回复
切换为时间正序
请发表友善的回复…
发表回复
lbmshiwo 2006-06-01
  • 打赏
  • 举报
回复
MARK
xwdd129 2006-06-01
  • 打赏
  • 举报
回复
//简单示例,如果是要web打印只有cr10才可以实现
public void printReport(string reportPath,DataSet reportSet,string PrinterPath,string passWrd)
{
ReportDocument Report=new ReportDocument();
Report.Load(reportPath); \\ 例如:"C:\\Report1.rpt"

Report.SetDataSource(reportSet);

Report.PrintOptions.PrinterName =PrinterPath; //如:"\\\\office1\\HP1000";
try
{
Report.PrintToPrinter(1,false, 0, 0);
}
catch
{
;
}
finally
{
Report.Close();
}
}
csdsuper 2006-06-01
  • 打赏
  • 举报
回复
关注着

4,820

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术 图表区
社区管理员
  • 图表区社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧