asking for database login in crystal reports

Posted on 2006-04-10
Last Modified: 2012-06-21
i am using crystal reports 11. as soon as when i call .Show() method in
its asking for database logon,
i tried this cReport.SetDatabaseLogon("pos", "pos", g_strServerName, g_strDbName, False)
still its asking for it
wt to do?
Question by:x1877
    1 Comment

    Accepted Solution

    got the solution, i had to add the following code after loading the report.

                cReport.Load(Application.StartupPath & strReportFilName)

    These  lines ->

                Dim objTableLogOnInfo As New CrystalDecisions.Shared.TableLogOnInfo
                Dim objConnectionInfo As New CrystalDecisions.Shared.ConnectionInfo
                objConnectionInfo.ServerName = g_strServerName
                objConnectionInfo.DatabaseName = g_strDbName
                objConnectionInfo.UserID = g_strUserName
                objConnectionInfo.Password = g_strPwd
                objTableLogOnInfo.ConnectionInfo = objConnectionInfo


    Pl. refund the points

    Featured Post

    Why You Should Analyze Threat Actor TTPs

    After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

    Join & Write a Comment

    Suggested Solutions

    Title # Comments Views Activity
    Running Total between Main Report and SubReport 8 44
    CRRuntime - Alerts 9 42
    Crystal Reports Date Formula Failure 26 61
    Next Full Week 4 49
    Crystal Reports: 5 Tests for Top Performance It is complete, your masterpiece report.  Not only does it meet your customer’s expectations, it blows them out the water, all they want is beautifully summarised and displayed in a myriad of ways. …
    There have always been a lot of questions related to when Crystal Reports evaluates report components (such as formulas, summaries, cross-tabs, charts, to name a few examples). Crystal Reports uses a two-pass reporting process to provide greater …
    Internet Business Fax to Email Made Easy - With eFax Corporate (, you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
    Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

    755 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

    24 Experts available now in Live!

    Get 1:1 Help Now