找回密码
 立即注册

QQ登录

只需一步,快速开始

Lenka.Guo讲师达人认证 悬赏达人认证
超级版主   /  发表于:2016-3-1 14:10:00
11#
不同的报表模板有不同的创建方法,您使用的是ActiveReports哪个版本?

Dim rpt As New ReportName()


具体创建方法可参考文档:http://www.gcpowertools.com.cn/d ... #!Documents/_36.htm
回复 使用道具 举报
情难舍
注册会员   /  发表于:2016-3-1 15:57:00
12#
回复 11楼Lenka.Guo的帖子

ActiveReport 7版本  我需要创建的是ActiveReport中的基于代码的报表,后缀名是.vb。 “Dim xtr As New System.Xml.XmlTextReader(Application.StartupPath +"\report.rpx")”这段代码只能读取基于XML的报表。
如果我要读取基于代码的报表应该怎样实现呢   非常感谢
回复 使用道具 举报
情难舍
注册会员   /  发表于:2016-3-1 16:18:00
13#
回复 11楼Lenka.Guo的帖子


Dim sectionReport As New SectionReport1()

        Dim xlsExport1 As New GrapeCity.ActiveReports.Export.Excel.Section.XlsExport()
        xlsExport1.FileFormat = GrapeCity.ActiveReports.Export.Excel.Section.FileFormat.Xlsx
        xlsExport1.Export(sectionReport.Document, Application.StartupPath + "\\xxx.xlsx")

数组越界错误
回复 使用道具 举报
Lenka.Guo讲师达人认证 悬赏达人认证
超级版主   /  发表于:2016-3-1 17:15:00
14#
代码修改为:
Dim sectionReport As New SectionReport1()
sectionReport.Run();
        Dim xlsExport1 As New GrapeCity.ActiveReports.Export.Excel.Section.XlsExport()
        xlsExport1.FileFormat = GrapeCity.ActiveReports.Export.Excel.Section.FileFormat.Xlsx
        xlsExport1.Export(sectionReport.Document, Application.StartupPath + "\\xxx.xlsx")

如果仍然报错,您可以在开始菜单,找到GrapeCity ->本机示例程序—&gtrofessional 文件夹下打开EndUserDesigner 示例程序,运行之后,使用EndUserDesigner, 打开您所设计的报表,选择预览,看看是否能正常导出。
回复 使用道具 举报
情难舍
注册会员   /  发表于:2016-3-1 17:20:00
15#
回复 14楼Lenka.Guo的帖子

非常感谢,这种东西没有接触过真的没得一点办法。。。OK 解决了。。。谢谢
回复 使用道具 举报
Lenka.Guo讲师达人认证 悬赏达人认证
超级版主   /  发表于:2016-3-1 17:29:00
16#
回复 15楼情难舍的帖子

不客气~~欢迎您随时提问~~~
回复 使用道具 举报
12
您需要登录后才可以回帖 登录 | 立即注册
返回顶部