Why does the Database Login dialog box pop up during runtime? The dialog box displays:
Table name: ADPFile
Server Name: Myserver
Login ID: MyUID
Password: <this is blank even though I provided it in the SQLConnection string>
When I type in the password and click the Finish button, it display the report as a dump of the SQL Server View (ADPFile) NOT as the SELECT query that I want to pass.
Any help will be greatly appreciated. It is hard to find good documentation.
IDE and Crystal Version - VS2003 Pro and Crystal Reports 9
Code Specifics -
private void Form4_Load(object sender, System.EventArgs e)
ADPReport rpt = new ADPReport();
SqlConnection cn = new SqlConnection("Data Source=Myserver;Database=myDB;uid=MyUID;pwd=Hello");
SqlDataAdapter ADPda = new SqlDataAdapter("SELECT CEMPID, UTADPID, CEMPNAME, PAYRATE, COALESCE(EXPAMT,' ')AS EXPAMT, REGHRS, OTHRS,PAYTYPE FROM ADPFile WHERE (PAYTYPE = 1 AND EXPAMT IS NOT NULL) OR (PAYTYPE = 2) ORDER BY PAYTYPE, CEMPNAME", cn);
DataSet ADPds = new DataSet();
crystalReportViewer1.ReportSource = rpt;