如何在Crystal Report中设置数据库的位置? [英] How to Set Location of Database in Crystal Report?

查看:72
本文介绍了如何在Crystal Report中设置数据库的位置?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


我是Crystal Report的新手。我使用用户DSN创建了一个报告,我在使用CRViewer的Visual Basic应用程序中调用了它。它在我的机器上工作正常,但是一旦我在用户机器上安装它,我必须在每台机器上手动创建用户DSN,然后在那里安装Crystal Report,手动转到Database-> Set Location->选择新的UserDSN - >选择数据库表以使我的报告在我的VB应用程序中可见,否则我将收到一条错误消息"服务器尚未打开。"


有没有人有任何想法如何克服这个或任何样本编码在运行时设置数据库的位置?我迫切需要它。


任何帮助将不胜感激!非常感谢!


顺便说一句,我使用MySQL与Crystal Report 8.0和Visual Basic 6.0




解决方案

我建议不要使用DSN,因为它需要全部运行此应用程序的计算机。您可以使用OLEDB连接并按照此kbase文章切换它所指向的数据库:
http://support.businessobjects.com/library/kbase/articles/c2011464.asp


Hi,

   I am a newbie in Crystal Report. I have created a report using User DSN, and I have called it in my Visual Basic application with CRViewer. It's working fine in my machine, but once I install it in user machine, I have to manually create the User DSN in every machine, then install Crystal Report there, manually go to Database->Set Location->Select the new UserDSN->select the database table to make my report viewable in my VB application, or else I will get an error message "Server have not  yet been opened."

  Do anyone have any idea how to overcome this or any sample coding to set location of the database at run time? I need it urgently.

  Any help will be greatly appreciated! Thanks a lot!

  btw, I am using MySQL with Crystal Report 8.0 and Visual Basic 6.0

 

 

 

解决方案

I would suggest not using a DSN as it will be required on all machines that run this application.  You could use an OLEDB connection and switch which database it is pointing at by following this kbase article:
http://support.businessobjects.com/library/kbase/articles/c2011464.asp


这篇关于如何在Crystal Report中设置数据库的位置?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆