Click here to Skip to main content
14,665,301 members
Rate this:
Please Sign up or sign in to vote.
See more:
Im creating a crystal report on vb.net using sql server 2005,it's working well when retrieving the record, but it always asking to enter password and username on sql server how to make it stop asking for username and password? thx u for answering me :)
Posted
Updated 19-Dec-16 20:04pm

Rate this:
Please Sign up or sign in to vote.

Solution 3

Dim myConnectionInfo As New ConnectionInfo()
myConnectionInfo.ServerName = "."
myConnectionInfo.DatabaseName = "doc"
myConnectionInfo.UserID = "orka2"
myConnectionInfo.Password = "P@ssw0rd2012"
rpt.SetDatabaseLogon("orka2", myConnectionInfo.Password, myConnectionInfo.ServerName, myConnectionInfo.DatabaseName)
   
Rate this:
Please Sign up or sign in to vote.

Solution 4

Dim myConnectionInfo As New ConnectionInfo()
myConnectionInfo.ServerName = "."
myConnectionInfo.DatabaseName = "doc"
myConnectionInfo.UserID = "orka2"
myConnectionInfo.Password = "P@ssw0rd2012"
rpt.SetDatabaseLogon("orka2", myConnectionInfo.Password,myConnectionInfo.ServerName, myConnectionInfo.DatabaseName)
   
Comments
uspencersv 3-Jun-16 9:06am
   
where you have to put it ? web config or ?
Rate this:
Please Sign up or sign in to vote.

Solution 5

first make ODBC connection to database and create Crystel report using that ODBC and Save.you can save that Crstel report in your debug folder and in any event you can load this report to your crystel report viwer.

string username = "sa"; // database user name
string password = "a12A!@"; //database password

ReportDocument cryRpt = new ReportDocument();

cryRpt.Load(@"Additional.rpt");
cryRpt.SetDatabaseLogon(username, password); //here usaer name and password for crystel report
reports.ReportSource = cryRpt;
reports.RefreshReport();
reports.Refresh();
   

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)




CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100