关于如何调用水晶报表crystal report8.0 ?万分着急!一定给分!

jsbeginer 2003-05-05 09:30:03
我用水晶报表8.0做了两个rpt文件,请问如何在vb6中调用。
用水晶报表4.6我已经成功调用。就是添加部件crystal report Control4.6 然后调用。
crp1.ReportFileName = App.Path & "\report\mf.rpt"
crp1.Action = 1
If Not Data1.Recordset.BOF Then
Data1.Recordset.MoveFirst
End If
而,我现在用水晶报表8.0是这样调用的:(已增加
Crystal Reports 8 ActiveX Designer Run Time Library
和控件 Crystal Report Viewer Control)
Private Sub cmdprint_Click()
Dim cry As cryxdrt.Report
Dim dryat As cryxdrt.Application
Set sryat = New cryxdrt.Application
Set cry = cryat.OpenReport(App.Path & "\report\printperson1.rpt")
cr8.ReportSource = dry
dr8.ViewReport
End Sub ‘为何不对?
不知大虾们能否帮我一下,最好详细点,一点结分。
请问调用分几个步骤,怎么写。
如果哪位老兄能发个例子给我,将不胜感激!!!联系邮件:jschenxiaolong@163.com
...全文
71 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
jsbeginer 2003-05-15
  • 打赏
  • 举报
回复
到底如何调用?
用哪几个控件?与4.6中调用的差别是什么?谢了。
whwasd 2003-05-06
  • 打赏
  • 举报
回复
像4.5這樣調用不成?
我的由7.0升到8.5後,裡面的程序都不用修改啊!我是這樣用的:
Crp.ReportFileName = App.Path + "\report\mf.rpt"
Crp.SQLQuery = "select * from table where 條件"
Crp.action = 1

807

社区成员

发帖
与我相关
我的任务
社区描述
VB 多媒体
社区管理员
  • 多媒体
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧