你可以装一个pdf虚拟打印机,然后直接用activereport打印就可以了!

解决方案 »

  1.   

    主  题:  如何把Activereport设计的报表存为其他格式???Rtf,pdf 
    作  者:  powpow (飞机)  
    等  级:    
    信 誉 值:  100 
    所属论坛:  Visual Basic 
    问题点数:  40 
    回复次数:  0 
    发表时间:  2002-03-28 17:32:00 
       
     Activereport可以导出PDF,RTF,HTML等多种格式,但首先要在VB中“引用”DLL连接库,如EXport PDF Filter等。
       下面是一个例子供参考:
    Dim PdfFile As New ActiveReportsPDFExport.ARExportPDF, PrintToPath As String
        PrintToPath = GetIniS("Path&Name", "PrintTo", SystemTempPath)
        With PdfFile
            .FileName = PrintToPath & Car_Nr & ".pdf"
            .SemiDelimitedNeverEmbedFonts = ""
            .JPGQuality = 100
            .AcrobatVersion = DDACR40
            .Export ZP5Report.Pages
        End With 
     
      

  2.   

    再说两句:activerepot.pages.save 这样直接引用是要出错的,你没有告诉“save”为什么格式的文件,它会直接将报表保存为“RPX”格式。
      还是那句话,应该在“工具”菜单下……“引用”菜单中选取“ActiveReport Export PDF Filter”(导出PDF格式)或者“ActiveReport Export Excel Filter”(导出Excel格式)等等连接库后,在进行指定文件名(Filename)、生成质量(JPGQuality)等等导出工作,具体的例子在ActiveReport安装目录下有一个Samples目录,内有许多实例可供参考!
      

  3.   

    为什么我输出的时候出现错误,Pages collection contains 0 pages!
      

  4.   

    “Pages collection contains 0 pages”这句话的意思是“没有指定输出的页数”。
        看清楚了“.Export Report.Pages”,在用Export方法时,请指定需要输出的页数,“Report.Pages”是指输出报告所有的页数
      

  5.   

    还是那个错误,就是用的你的代码呀
    运行到.export report.pages时出错
      

  6.   

    Dim PdfFile As New ActiveReportsPDFExport.ARExportPDF
        With PdfFile
            .FILENAME = "c:\1.pdf"
            .SemiDelimitedNeverEmbedFonts = ""
            .JPGQuality = 100
            .AcrobatVersion = DDACR40
            .Export Report.Pages
        End With
    出现错误
    ActiveReports PDF export DLL error
    Pages collection contains 0 pages.  Export Fails.