Link to home
Start Free TrialLog in
Avatar of HASANDIZ
HASANDIZ

asked on

Crystal Report Login Screen apears on runtime

I have a windows application and some crystal reports associated with it. It was working fine until I had to make some changes with the reports. I has to add some more parameters to the reports. After I made changes the .rpt file and run the application, now login screen appears on the client applicaton.

I can connect using CR 11 but  cannot connect to my database in Visual Studio VB.net. What am I doing wrong?

Atached is the screen when I try to lgin my databe in VS Crystal Report. My database have no password !
CrystalReportError.jpg
Avatar of newyuppie
newyuppie
Flag of Ecuador image

Hi,

I'm thinking it has to do with the parameters you added. The image you sent says "ADO error code", which leads me to think there is an error either connecting to the DB, or running a query against the DB. Maybe when you added the parameters, your query is the wrong format, or you connection string is faulty.

NY
Avatar of HASANDIZ
HASANDIZ

ASKER

The report works and shows data when I open it on Crystal Report 11. Afetr I save and close the CR11 I copy the .rpt file to my app report folder so  cn use it on my application. However, when I execute the application, cristal report viewer asks for login screen.  My login VB code is like;

        Dim _crReportFile As String = vbNullString
        _crReportFile = _GlbCurrentDirectory & "\Reports\" & ReportName
        Dim objReport As New CrystalDecisions.CrystalReports.Engine.ReportDocument
        objReport.Load(_crReportFile)

        Dim ConInfo As New CrystalDecisions.Shared.TableLogOnInfo
        ConInfo.ConnectionInfo.ServerName = _ServerName
        'ConInfo.ConnectionInfo.ServerName = _GlbCurrentDirectory & "\DataBases\LongsonMasterDB.accdb"
        ConInfo.ConnectionInfo.DatabaseName = ""
        ConInfo.ConnectionInfo.UserID = ""
        ConInfo.ConnectionInfo.Password = ""
        For intCounter As Integer = 0 To objReport.Database.Tables.Count - 1
            objReport.Database.Tables(intCounter).ApplyLogOnInfo(ConInfo)
        Next

        CrystalReportViewer1.ReportSource = objReport


Other reports that I made a year ago works. Only the one I made changes asks me a login screen?
Maybe you have used a different version of Crystal Reports to make your report back then. It is a paid application after all, and the one that ships with Visual Studio I think is not the full one. Maybe that's the problem.

What do you mean it asks you for a login screen? Could you post a screenshot of this login screen?
screen shot

screenshot.jpg
Avatar of Mike McCracken
Try using the user name of ADMIN.

If that doesn't work use the password as chr(10)

mlmcc
ASKER CERTIFIED SOLUTION
Avatar of HASANDIZ
HASANDIZ

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Yes, Crystal does cache the results of the query so that may have cause an issue.

mlmcc