Click here to Skip to main content
15,909,332 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Am using crystal reports and the form that displays the report keeps asking me for a user login ID and Password. these codes are in the form that contains the crystal report viewer

C#
sqlConn = new SqlConnection(Properties.Settings.Default.GEMConnection);
cr0DataSet1 ds = new cr0DataSet1();
param = new SqlParameter("@companyName", CusMeterReport.apostate);
da = new SqlDataAdapter("SELECT no,companyName,meterNo,fault,comments,date,MeterType WHERE companyName=@companyName",sqlConn);
da.SelectCommand.Parameters.Add(param);
da.Fill(ds.FaultyMeters);

cr0 c0 = new cr0();
c0.SetDataSource(ds);
crystalReportViewer1.ReportSource = c0;



thanks in advance Guys
Posted

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



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900