繁体   English   中英

服务器系统中没有安装打印机

[英]No printers are installed in server system

打印在服务器系统中不起作用。 它显示错误消息。

System.Drawing.Printing.InvalidPrinterException: 服务器系统中没有安装打印机。

public void print()
{
    SC.Open();
    SqlCommand cmd = new SqlCommand("select * from converstion where status='A'", SC);
    SqlDataAdapter da = new SqlDataAdapter();
    da.SelectCommand = cmd;
    DataTable datatable = new DataTable();
    da.Fill(datatable);
    ReportDocument crreport = new ReportDocument();
    crreport.Load(Server.MapPath("~/Conversion.rpt"));       crreport.SetDataSource(datatable);
    crreport.PrintToPrinter(1, false, 0, 0);
    SC.Close();

看起来您必须在服务器上安装打印机驱动程序。

我也收到此错误,因为用户帐户无权访问打印机。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM