运行时的Crystal报表设置 [英] Crystal Report Setting For Runtime

查看:82
本文介绍了运行时的Crystal报表设置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

亲爱的兄弟.

我已使用以下代码为运行时设置Crystal Report设置.

Dear Brothers.

I have used the following code to set the Crystal Report setting for Run Time.

Dim strDBPath as string = "C:\DB.mdb"
Dim Rpt As New rptDailyExp
            Rpt.DataSourceConnections.Item(0).SetConnection(strDBPath, "HomeDB.mdb", False)
            Rpt.DataSourceConnections.Item(0).SetLogon("admin", "admin")
            Rpt.SetDatabaseLogon("admin", "admin", strDBPath, "HomeDB.mdb", True)

            Rpt.SetDataSource(Ds)
            CRVSearch.ReportSource = Rpt  ' CRVSearch is Crystal Report Viewer
            CRVSearch.Refresh()



但是,当我运行此代码块时,会出现以下错误.

登录失败,请重试.


因此,请告诉我解决方案.



But when I run this block of code it give me the following error.

Login Failed, Please Try again.


So, Please tell me the solution.

推荐答案

如果您的Access数据库中没有密码,请删除密码.
Remove the password if you dont have a password in your Access database.


这篇关于运行时的Crystal报表设置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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