Crystal Report总是要求数据库登录 [英] Crystal Report always asks for database login
本文介绍了Crystal Report总是要求数据库登录的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我需要您的帮助。
我正在为商店程序编写代码,并且正在使用vb.net 2008和Crystal Report版本10.5.37xxxx
I'm writing code for a shop program and I am using vb.net 2008 with Crystal Report version 10.5.37xxxx
问题是,当我尝试在客户端计算机上安装程序时,一切正常,但在Crystal Report中不起作用。它总是要求数据库登录,而我没有编写程序来请求数据库登录。
The problem is when I'm trying to install my program on the client computer, everything works but not in my Crystal Report. It always asks for the database login and I did not code my program to ask for the database login.
我只是用以下简单代码编写的:
I just wrote it in simple code like this:
Public Class Form16
Private Sub Form16_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim view As New CrystalReport4
view.SetParameterValue("p_1", Form5.no_faktur_tb_immanuel)
CrystalReportViewer1.ReportSource = view
End Sub
End Class
有人可以帮我吗?
推荐答案
您应该可以手动编码
Public Class Form16
Private Sub Form16_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim view As New CrystalReport4
Dim user as string = "Username"
Dim pwd as string = "Password"
view.SetDatabaseLogon(user, pwd)
view.SetParameterValue("p_1", Form5.no_faktur_tb_immanuel)
CrystalReportViewer1.ReportSource = view
End Sub
End Class
这篇关于Crystal Report总是要求数据库登录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文