水晶测井问题 [英] Problem in crystal logging
问题描述
这里是我用于通过前端生成水晶报告的代码
一切顺利但是在点击刷新后即使通过正确的用户名和密码也显示登录失败
Dim cryRpt As New ReportDocument
Dim crtableLogoninfos As New TableLogOnInfos
Dim crtableLogoninfo As New TableLogOnInfo
Dim crConnectionInfo作为新的ConnectionInfo
Dim CrTables作为表格
Dim CrTable As Table
cryRpt.Load( C:\Documents and Settings \Administrator \Desktop\Sales_Analysis 020313.rpt)
使用crConnectionInfo
.ServerName = TESTVM
.DatabaseName =SGUJDT
.UserID =sa
.Password =admin-123
结束
CrTables = cryRpt.Database。表格
每个CrTable中的CrTable
crtableLogoninfo = CrTable.LogOnInfo
crtableLogoninfo.ConnectionInfo = crConnectionInfo
CrTable。 ApplyLogOnInfo(crtableLogoninfo)
下一页
CrystalReportViewer1.ReportSource = cryRpt
here's the code which i am using for crystal report generation through front end
all is going well but after clicking on refresh even after passing correct username and password it shows login failed
Dim cryRpt As New ReportDocument
Dim crtableLogoninfos As New TableLogOnInfos
Dim crtableLogoninfo As New TableLogOnInfo
Dim crConnectionInfo As New ConnectionInfo
Dim CrTables As Tables
Dim CrTable As Table
cryRpt.Load("C:\Documents and Settings\Administrator\Desktop\Sales_Analysis 020313.rpt")
With crConnectionInfo
.ServerName = "TESTVM"
.DatabaseName = "SGUJDT"
.UserID = "sa"
.Password = "admin-123"
End With
CrTables = cryRpt.Database.Tables
For Each CrTable In CrTables
crtableLogoninfo = CrTable.LogOnInfo
crtableLogoninfo.ConnectionInfo = crConnectionInfo
CrTable.ApplyLogOnInfo(crtableLogoninfo)
Next
CrystalReportViewer1.ReportSource = cryRpt
推荐答案
查看此
C#Crystal Reports动态登录参数 [ ^ ]
您好
如果您的项目中有两个数据集,那么当您需要查看时,它会显示登录表单水晶报告。
您可以使用一个数据集,然后不要求登录。
Hi
If in your project there are two dataset then it show the login form when you have to see the crystal report.
you can use the one dataset then it dose not ask the login.
这篇关于水晶测井问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!