Crystal Reports not using database logon info RRS feed

  • Question

  • 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
        End Sub

    I'm posting this on this forum, and one of the forums on SAP hoping that one will be able to give me the answer I need.  

    Tuesday, May 1, 2012 7:12 PM