水晶报表输出到一个流,提示无效的输出选项? OK了,上述代码正确,现在是把流传到客户端后 如何打印预览?我是用的是winform,不是web,用remoting方式.请高手指教?不要生成文件! 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 /// <summary> /// 打印一份crystal Report /// </summary> /// <param name="reportPath">报表路径</param> /// <param name="reportSet">报表数据源的DataSet</param> public void printReport(string reportPath,string PrinterPath,string passWrd) { ReportDocument crystalReportObject=new ReportDocument(); crystalReportObject.Load(reportPath);//"e://temp//crt.rpt" crystalReportObject.Refresh(); this.SetConnectionInfo(crystalReportObject,passWrd); //crystalReportObject.PrintOptions.PrinterName =@"\\office1\HP1000"; crystalReportObject.PrintOptions.PrinterName =PrinterPath ; try { crystalReportObject.PrintToPrinter(1,false, 0, 0); } catch { ; } finally { crystalReportObject.Close(); } } public void printReport(string PrinterPath,ReportDocument crystalReportObject) { crystalReportObject.PrintOptions.PrinterName =PrinterPath ; try { crystalReportObject.PrintToPrinter(1,false, 0, 0); } catch { ; } finally { crystalReportObject.Close(); } // CrystalDecisions.Web.CrystalReportViewer myView=new CrystalDecisions.Web.CrystalReportViewer(); // myView.LogOnInfo } 关于线程里弹出模态框的问题 泛型的类型转换! ASP.NET中将excel导入到数据库,请高手指点 C#UserControl 怎样控制TabControl的显示? 按钮绘制半透明PNG图像的问题 vs2005如何添加Excel Workbook等模板 DataList控件的问题 C#中一个简单类继承的问题!!! cs端想运行html5,可有什么例子? 关于合法性检查,高手请进! 如可禁止DataGrid (windows)中Delete键
/// 打印一份crystal Report
/// </summary>
/// <param name="reportPath">报表路径</param>
/// <param name="reportSet">报表数据源的DataSet</param>
public void printReport(string reportPath,string PrinterPath,string passWrd)
{
ReportDocument crystalReportObject=new ReportDocument();
crystalReportObject.Load(reportPath);//"e://temp//crt.rpt"
crystalReportObject.Refresh();
this.SetConnectionInfo(crystalReportObject,passWrd);
//crystalReportObject.PrintOptions.PrinterName =@"\\office1\HP1000";
crystalReportObject.PrintOptions.PrinterName =PrinterPath ;
try
{
crystalReportObject.PrintToPrinter(1,false, 0, 0);
}
catch
{
;
}
finally
{
crystalReportObject.Close();
}
}
public void printReport(string PrinterPath,ReportDocument crystalReportObject)
{ crystalReportObject.PrintOptions.PrinterName =PrinterPath ;
try
{
crystalReportObject.PrintToPrinter(1,false, 0, 0);
}
catch
{
;
}
finally
{
crystalReportObject.Close();
}
// CrystalDecisions.Web.CrystalReportViewer myView=new CrystalDecisions.Web.CrystalReportViewer();
// myView.LogOnInfo
}