如何使用 C# Asp.net 将水晶报表直接打印到客户端机器

111

本文介绍了如何使用 C# Asp.net 将水晶报表直接打印到客户端机器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

问题描述

我需要在不显示报表或不显示任何对话框的情况下将 Crystal 报表页面打印到客户端打印机.

I need to print a Crystal report page to client printer machine without showing the report or without showing any dialog box.

我想提一点,我知道客户端打印机的名称.如何将路径发送到该打印机.

One point I'd like to mention is that I know the name of Client Printer. How do I send the path to that printer.

只是为了说明应用程序在远程位置的服务器计算机上运行.

Just to make it clear the application runs on a server machine in a remote location.

这里有一些类似的问题,但没有任何最终解决方案,比如这个.

There are some similar question here , but WITHOUT any final solution,like this one.

如何打印水晶报告没有在 asp.net 中打开报告?

我可以使用特定的解决方案吗?

Is there a specific solution to this that I can use ?

推荐答案

下面一行打开打印对话框进行打印而不显示打印预览CrystalReportViewer1.PrintReport();

Below line opens up print dialog box to print without showing print preview crystalReportViewer1.PrintReport();

下面一行直接将报表文档发送到默认打印机.

Below line directly sends reportdocument to default printer.

oReportDocument.PrintToPrinter(1,true,0,0);

oReportDocument.PrintToPrinter(1,true,0,0);

这篇关于如何使用 C# Asp.net 将水晶报表直接打印到客户端机器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

The End

相关推荐

C# 中的多播委托奇怪行为?
Multicast delegate weird behavior in C#?(C# 中的多播委托奇怪行为?)...
2023-11-11 C#/.NET开发问题
6

参数计数与调用不匹配?
Parameter count mismatch with Invoke?(参数计数与调用不匹配?)...
2023-11-11 C#/.NET开发问题
26

如何将代表存储在列表中
How to store delegates in a List(如何将代表存储在列表中)...
2023-11-11 C#/.NET开发问题
6

代表如何工作(在后台)?
How delegates work (in the background)?(代表如何工作(在后台)?)...
2023-11-11 C#/.NET开发问题
5

没有 EndInvoke 的 C# 异步调用?
C# Asynchronous call without EndInvoke?(没有 EndInvoke 的 C# 异步调用?)...
2023-11-11 C#/.NET开发问题
2

Delegate.CreateDelegate() 和泛型:错误绑定到目标方法
Delegate.CreateDelegate() and generics: Error binding to target method(Delegate.CreateDelegate() 和泛型:错误绑定到目标方法)...
2023-11-11 C#/.NET开发问题
14