on 05-01-2012 8:13 PM
I am using VS 2010 SP1 with SQL Server 2008 R2 and Crystal Reports for VS 2010. I'm having a problem that just started occurring recently. On one of my reports, when I load it up, it sends me to the Database Logon screen. The thing is that I've already given the database logon information in the code, so as to prevent this screen. It was working until recently, and now 80% of the time that a client machine tries to go to this report, the screen appears. If I try to put the SQL Login information in, it won't allow it unless I uncheck integrated security, and then it will go to the report. I have no clue what would cause this. My coding for the button that opens the report page is this:
Private Sub btnPrint_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnPrint.Click
Dim frm As frmReports = New frmReports
Dim crysRepo As New crExpense
With frm.CrystalReportViewer1
.ReportSource = crysRepo
.ShowGroupTreeButton = False
.ToolPanelView = CrystalDecisions.Windows.Forms.ToolPanelViewType.None
End With
crysRepo.SetDatabaseLogon("jangel", "jangel")
crysRepo.SetParameterValue("EXP_NumP", Me.ComboBox1.Text)
frm.Button1.Visible = True
frm.Text = "SRB Expense Sheet (Print)"
frm.expNum = ComboBox1.Text
frm.Show()
End Sub
I'm posting this on this forum, and one of the forums on MSDN hoping that one will be able to give me the answer I need.
Hi,
Try the sample app 'DB Logon ' from below link.
See if it helps,
- Bhushan.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I agree wiht Bhushan that you should be using the ApplyLogonInfo API. SetDatabaseLogon will only work on datasources that are exactly the same as what the report was created off of. Also, recommend you update to SP3:
http://scn.sap.com/docs/DOC-7824
- Ludek
User | Count |
---|---|
78 | |
9 | |
8 | |
6 | |
6 | |
6 | |
6 | |
6 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.