Skip to Content
author's profile photo Former Member
Former Member

Crystal Reports not using database logon info

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.

Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • Best Answer
    Posted on May 02, 2012 at 08:41 AM


    Try the sample app 'DB Logon ' from below link.

    See if it helps,

    - Bhushan.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.