TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
magesh manavalan
NA
331
507.3k
Error Shows Object Reference not set to an instance of object
Nov 3 2012 7:35 AM
con = new SqlConnection("Server=(local);initial catalog=ServiceTax;Trusted_Connection=True");
con.Open();
string str = "select * from Service where Billno='" + textBox1.Text+ "'";
SqlCommand com = new SqlCommand(str, con);
SqlDataAdapter sqlda = new SqlDataAdapter(com);
DataSet ds = new DataSet();
sqlda.Fill(ds, "Service");
con.Close();
ReportDocument RptDoc = new ReportDocument();
HttpContext.Current.Server.MapPath("Reports/SReport.rpt");
RptDoc.SetDataSource(ds);
crystalReportViewer1.ReportSource = RptDoc;
crystalReportViewer1.RefreshReport();
In run mode i have one text box and Button in that button i type a partiuclar bill no that data to be displayed.when i type the particular bill no an dick that button Error Shows as Object Reference not set to an instance of object.
In this line HttpContext.Current.Server.MapPath("Reports/SReport.rpt"); [Object Reference not set to an instance of object]
Reply
Answers (
0
)
Filter on Crystal Report
palindrome