CR 2010 asks for LoginID and Password at runtime everytime...

Posted on 2012-09-21
Last Modified: 2012-10-04
Problem: Every Report I run from a client asks for SQL Login, and whatever I enter comes back with wrong password. I have a second client PC that it doesn't ask for and the report runs fine.
Both clients have the exact same installation: MS Visual PowerPacks 10.0,  SAP Reports runtime engine (13.0)

VS2010 VB Project linked to SQL DB.

I have in the code:

Dim fB As New CR_Placeholder()
            Dim report As New Report_2
            Dim BeginDateHolder = report.ParameterFields("BeginDate")
            BeginDateHolder.HasCurrentValue = True
            Dim EndDateHolder = report.ParameterFields("EndDate")
            EndDateHolder.HasCurrentValue = True
            Dim PlaceHolder = report.ParameterFields("locid")
            PlaceHolder.HasCurrentValue = True
            Dim connectionInfo As New ConnectionInfo()

            connectionInfo.UserID = "SQLUSERNAME"
            connectionInfo.Password = "SQLPASSWORD"
            connectionInfo.DatabaseName = "URIEquip"
            SetDBLogonForReport(connectionInfo, report)

            fB.CrystalReportViewer1.ReportSource = report
            fB.WindowState = FormWindowState.Maximized


CR uses an OLE DB Connection and the save data checkbox is cleared.

I can attach to the DB using an ODBC with the same credentails...

Antivirus and firewalls turned off.
Question by:BKennedy2008
    LVL 18

    Expert Comment

    connectionInfo has also server name. Try to set it too.
    LVL 83

    Expert Comment

    Can you show code for SetDBLogonForReport? Any subreports?

    Author Comment

    I must be missing an install, because I installed VS 2010 on the client PC (Pro) and it installed all the pre-requisites, and it ran like a champ with no problem. I will have to figure out what I missed on the pre-requisite programs that get installed with VS 2010. I even started with a clean wipe of the client's pc...

    Author Comment

    I am using the loop as well for any other tables:

    Private Sub SetDBLogonForReport(connectionInfo As ConnectionInfo, reportDocument As ReportDocument)
            Dim tables As Tables = reportDocument.Database.Tables
            For Each table As CrystalDecisions.CrystalReports.Engine.Table In tables
                Dim tableLogonInfo As TableLogOnInfo = table.LogOnInfo
                tableLogonInfo.ConnectionInfo = connectionInfo

        End Sub

    Author Comment

    I will have to try server name on a new install tomorrow, and will let you know. thanks
    LVL 100

    Accepted Solution

    If installing the full Crystal solvved the issue then you are missing a dll or permissions to it.

    How did you install the Crystal runtime?

    Is it the same report?

    Are they using the same database?


    Author Closing Comment

    I must be missing a dll

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Highfive + Dolby Voice = No More Audio Complaints!

    Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

    Parsing a CSV file is a task that we are confronted with regularly, and although there are a vast number of means to do this, as a newbie, the field can be confusing and the tools can seem complex. A simple solution to parsing a customized CSV fi…
    International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
    Via a live example, show how to setup several different housekeeping processes for a SQL Server.
    Viewers will learn how to use the UPDATE and DELETE statements to change or remove existing data from their tables. Make a table: Update a specific column given a specific row using the UPDATE statement: Remove a set of values using the DELETE s…

    760 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    12 Experts available now in Live!

    Get 1:1 Help Now