[VB.NET]PrintDocument如何打印水晶报表喔?

前端之家收集整理的这篇文章主要介绍了[VB.NET]PrintDocument如何打印水晶报表喔?前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
PrintDocument如何打印水晶报表喔? PrintDocument如何打印水晶报表喔? __________________________________________________________________________ Dim RptDoc As ReportDocument = Me.LoadRpt(RptData) If Not RptDoc Is Nothing Then RptDoc.PrintToPrinter(1,True,0) End If 生成报表文件 Private Function LoadRpt(ByVal RptData As DataRow) As ReportDocument Dim fileName As String = Application.StartupPath + / + RptData( cRepName ) If Not File.Exists(fileName) Then Throw New Exception( 报表文件不存在! ) End If Dim RepDoc As New ReportDocument RepDoc.Load(fileName) Me.LoadRptData(RepDoc,RptData) Me.SetParamToRpt(RepDoc,RptData) Return RepDoc End Function __________________________________________________________________________ 错了,上面的方法是将水晶报表文件转化为一个ReportDocument,然后打印. 而不是转化为PrintDocument __________________________________________________________________________ 提示错误:未定义类型 ReportDocument ReportDocument已经拖到了窗体上了.... __________________________________________________________________________ 原文链接:https://www.f2er.com/vb/263562.html

猜你在找的VB相关文章