[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

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

Posted on 2012-09-21
7
Medium Priority
?
607 Views
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.CurrentValues.AddValue(BeginDate.Value)
            BeginDateHolder.HasCurrentValue = True
            Dim EndDateHolder = report.ParameterFields("EndDate")
            EndDateHolder.CurrentValues.AddValue(EndDate.Value)
            EndDateHolder.HasCurrentValue = True
            Dim PlaceHolder = report.ParameterFields("locid")
            PlaceHolder.CurrentValues.AddValue(warehouse.SelectedValue)
            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

            fB.ShowDialog()

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.
0
Comment
Question by:BKennedy2008
7 Comments
 
LVL 18

Expert Comment

by:vasto
ID: 38423429
connectionInfo has also server name. Try to set it too.
0
 
LVL 83

Expert Comment

by:CodeCruiser
ID: 38423783
Can you show code for SetDBLogonForReport? Any subreports?
0
 

Author Comment

by:BKennedy2008
ID: 38423892
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...
0
What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

 

Author Comment

by:BKennedy2008
ID: 38423896
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
            table.ApplyLogOnInfo(tableLogonInfo)
        Next



    End Sub
0
 

Author Comment

by:BKennedy2008
ID: 38423899
I will have to try server name on a new install tomorrow, and will let you know. thanks
0
 
LVL 101

Accepted Solution

by:
mlmcc earned 1500 total points
ID: 38423997
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?

mlmcc
0
 

Author Closing Comment

by:BKennedy2008
ID: 38463962
I must be missing a dll
0

Featured Post

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Ever wondered why sometimes your SQL Server is slow or unresponsive with connections spiking up but by the time you go in, all is well? The following article will show you how to install and configure a SQL job that will send you email alerts includ…
Ready to get certified? Check out some courses that help you prepare for third-party exams.
Via a live example, show how to backup a database, simulate a failure backup the tail of the database transaction log and perform the restore.
Viewers will learn how to use the SELECT statement in SQL to return specific rows and columns, with various degrees of sorting and limits in place.
Suggested Courses

872 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