الفريق العربي للبرمجةأرشيف المنتديات · 2000 – 2023
نسخة أرشيفية للقراءة فقط — التسجيل والمشاركة مغلقان، والمحتوى محفوظ كما كان.

question on crystalReport

مغلق
بدأه eng_prog في 1 مارس 2005 · 0 رد · 486 مشاهدة · في Microsoft Visual C#.NET
مشاركة: واتساب X فيسبوك تيليجرام
#1

i want to display the result that are on data table dt1

by the crystalReport ( without dataset ) 0

as this example:-0

sqlConnection1.Open (); // i drag it visually and connect it with northwin
string s = "select * from  Employees";// this table on northwind database
sqlCommand1 .CommandText = s; // i drag it visually
SqlDataAdapter da = new SqlDataAdapter (s,sqlConnection1 );
Datatable dt1 = new Datatable (); // decalar object from datatable
SqlCommandBuilder bc = new SqlCommandBuilder (da);
da.Fill (dt1);    // fill the result on the datatable dt1
CrystalReport1 rep = new CrystalReport1 (); // i drag it visually ( blank report )
rep.SetDataSource (dt1);
crystalReportViewer1 .ReportSource = rep; // i drag it visually
sqlConnection1 .Close ();

when i run this example

exception is found

the exception say:

Invalid table number

what i do ?

Note : i do not use dataset typed and i do not use it

هذا الموضوع مغلق.

مواضيع مشابهة