Click here to Skip to main content
15,896,912 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hi dears,
when i run my project, crystal report viewer dont show my record on tblnews.
here is my code:
C#
SqlConnection con = new SqlConnection(@"server=.\Mssql2008;database=Nosazi Madares;integrated security=true");
               DataView dv = new DataView();
               DataSet ds = new DataSet();
               SqlDataAdapter da;
               con.Open();
               da = new SqlDataAdapter("select * from Tblnews", con);
               da.Fill(ds, "Tblnews");
               dv.Table = ds.Tables["Tblnews"];
               crystalReportViewer1.ReportSource = dv;
Posted
Comments
Abhinav S 1-Feb-14 4:31am    
The table contains records?
Hemant Singh Rautela 1-Feb-14 4:39am    
Use the debugger, And check values of all variables in each steps...
[no name] 1-Feb-14 4:46am    
Abhinav, yes it contain 5 record's.
Hemant Singh Rautela,
it say object refrence not set to an instance of an object
thatraja 3-Feb-14 5:23am    
In which line the error occurs? This errors when you don't initialize an object.

And use 'Reply' button to reply us, Doing this way only we could get mail notifications.

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