because when I debug the code step by step, the report couldn't be loaded at all.. what do you think is the problem?

Do you mind posting some sample of your code that you used

it is ok that i use a stored procedure as a command in selecting a table? ..

this is my code ..

SqlCommand cmd = new SqlCommand();
            SqlDataAdapter da = new SqlDataAdapter();
           
            DataSet ds = new DataSet();
            cmd.CommandType = CommandType.StoredProcedure;
            cmd.CommandText = "usp_displayregvisitor";
            cmd.Connection = con;

            da.SelectCommand = cmd;
            da.Fill(ds);

            CrystalReport2 myreport = new CrystalReport2();
            myreport.SetDataSource(ds);
            crystalReportViewer1.ReportSource = myreport;
            
            con.Open();
            cmd.ExecuteNonQuery();
            con.Close();

tnx!

now my error in that code is


"THE REPORT HAS NO TABLE"

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.