Crystal Report Login Screen apears on runtime

HASANDIZ
HASANDIZ used Ask the Experts™
on
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
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
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

Author

Commented:
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?
Introduction to Web Design

Develop a strong foundation and understanding of web design by learning HTML, CSS, and additional tools to help you develop your own website.

Author

Commented:
screen shot

screenshot.jpg
Mike McCrackenSenior Consultant
Most Valuable Expert 2011
Top Expert 2013

Commented:
Try using the user name of ADMIN.

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

mlmcc
Commented:
I restart the computer and for some reason it worked fine. I belive something stays in cash and prevent to connect to database. Thank you for your time anyway.
Mike McCrackenSenior Consultant
Most Valuable Expert 2011
Top Expert 2013

Commented:
Yes, Crystal does cache the results of the query so that may have cause an issue.

mlmcc

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial