ZenosZeng 发表于 2013-10-23 15:29:00

该方法返回类似是 boolean ,如下:

jinqiong 发表于 2013-10-23 17:58:00

不好意思,
你上面的代码 New出来的是SectionReport1这个类
但是我安装这个是日文版的,只有SectionReport类,
而且在Document下面是没有Print()方法的,
只有Printer属性,在Printer属性下面才有Print()方法,而且是没有返回值的

ZenosZeng 发表于 2013-10-23 18:11:00

我不确定AR日文版和国际版是否有这样的区别,我们这边只能在AR国际版中调查你的问题,如果确定是日文版特有的功能还需要你到我们的日文技术论坛询问,地址:https://www.grapecity.com/japan/support/

此外,很重要的一个信息是,你检查一下你的代码是否添加了 Imports GrapeCity.ActiveReports,因为在AR国际版中 Document.Print() 方法是由 GrapeCity.ActiveReports.PrintExtension 类型附加提供的。

jinqiong 发表于 2013-10-24 10:16:00

不好意思,
GrapeCity.ActiveReports这个我添加了
但是我在这个引用下面没有找到PrintExtension 类型。
我项目中的这个变量在VB6中的类型是ActiveReport,
那在vb.net中应该对应的类型就是SectionReport,对的吧

ZenosZeng 发表于 2013-10-24 11:24:00

你在 ActiveReports 7 帮助文档中能够搜索到 PrintExtension类型吗,如果帮助文档中也没有该类型,说明国际版和日文版确实有这样的差异

VB6中的ActiveReport类型在VB.NET对应的是 SectionReport 类型

jinqiong 发表于 2013-10-24 13:17:00

有的,找到了,谢谢。
但是,我项目中的这个变量在VB6中的类型是ActiveReport,
那我要调用Document.Print() ,
是不是需要把它的类型变成PrintExtension 才可以使用?
例如:
vb6: Publicprt As New ActiveReport
vb.Net: Publicprt As New PrintExtension
对吗?

ZenosZeng 发表于 2013-10-24 14:40:00

不用将 Activereport 替换为 PrintExtension,这里PrintExtension只是为 Document 提供一个扩展的 Print 方法

英文版实现直接打印的全部代码如下
Imports GrapeCity.ActiveReports

Public Class Form1

    Private Sub Button1_Click(sender As System.Object, e As System.EventArgs) Handles Button1.Click
      Dim report As New SectionReport1
      report.Run()
      report.Document.Print()
    End Sub

End Class





注意所应有的DLL文件

jinqiong 发表于 2013-10-24 16:47:00

好的,我试过了,出来了。
谢谢。

ZenosZeng 发表于 2013-10-24 17:53:00

:mj72: 如有问题可以开新帖,我先关闭该问题。

jinqiong 发表于 2013-10-25 09:05:00

好的,谢谢
页: 1 [2] 3
查看完整版本: ActiveReport的属性在vb.net中如何设置