Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Crystal Report Loading blank


Am using crystal report in visual studio 05.I have some prblm with it.I have created a dataset(.xsd file)and using it in report file.

but while loading the report it load as blank.sometimes it wil ask for login information.I have pasted the code below.

System.Data.SqlClient.SqlConnection conn = new System.Data.SqlClient.SqlConnection(ConfigurationManager.AppSettings["SqlConnectionString"]);

System.Data.SqlClient.SqlDataAdapter adpt = new System.Data.SqlClient.SqlDataAdapter("Select E.EmpName,n.NoOfLeaves from employeemaster e, leaveentry n where e.empid=n.empid and n.empid=2", conn);

DataSet dataSet = new DataSet();


ReportDocument mydoc = new ReportDocument();

string reportPath = Server.MapPath("CrystalReport.rpt");


for (int i = 0; i < mydoc.Database.Tables.Count; i++)




CrystalReportViewer1.ReportSource = mydoc;

PLease anyone help me.

Thanks in advance

Edited by: ZINKII on Apr 29, 2009 1:09 PM

Former Member

Helpful Answer

Not what you were looking for? View more on this topic or Ask a question