?
Solved

asking for database login in crystal reports

Posted on 2006-04-10
2
Medium Priority
?
489 Views
Last Modified: 2012-06-21
i am using crystal reports 11. as soon as when i call .Show() method in vb.net
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?
0
Comment
Question by:x1877
1 Comment
 

Accepted Solution

by:
x1877 earned 0 total points
ID: 16424399
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
            cReport.Database.Tables(0).ApplyLogOnInfo(objTableLogOnInfo)

Thanks

Pl. refund the points
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

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 …
Hello everyone, Hope you find this as helpful as we did. We have on the company I work for an application built in Delphi V with Crystal Reports 8. We all know that Crystal & Delphi can be temperamental sometimes and the worst thing is, nearly…
Screencast - Getting to Know the Pipeline
With just a little bit of  SQL and VBA, many doors open to cool things like synchronize a list box to display data relevant to other information on a form.  If you have never written code or looked at an SQL statement before, no problem! ...  give i…
Suggested Courses

809 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