Click here to Skip to main content
15,892,072 members
Please Sign up or sign in to vote.
5.00/5 (1 vote)
See more:
Dear Frnd..

I have done following errors on crystal reports blue underlined(DateWiseIP is like a field but used like a type):
please help me:


C#
if (TextBox1.Text == "")
        {
            DataTable dt = new DataTable();
            SqlConnection con = new SqlConnection();
            con.ConnectionString = "Data Source=PALANIVEL;Initial Catalog=HMS;User ID=sa;Password=login";
            con.Open();
            SqlDataAdapter ad = new SqlDataAdapter();
           
            DateWiseIP t2 = new DateWiseIP();
            ad = new SqlDataAdapter("select * from  Vw_InPatient where Reg_Date between '"+TextBox1.Text+"' and '"+TextBox2.Text+"'", con);
            ad.Fill(dt);
            t2.SetDataSource(dt);
            CrystalReportViewer1.ReportSource = t2;
            CrystalReportViewer1.RefreshReport();
Posted
Updated 16-Feb-14 22:52pm
v2
Comments
Richard MacCutchan 17-Feb-14 5:30am    
Where is DateWiseIP defined?
vignesh war 17-Feb-14 5:32am    
C center of the code DatewiseIp t2=new DateWiseIP() is der.
Richard MacCutchan 17-Feb-14 6:28am    
What?
Joshi, Rushikesh 17-Feb-14 16:20pm    
Do you know DateWiseIP belongs to which NameSpace? I believe you have created instance of Any type with field name (DateWiseIP), check private variable/property if any with same name DateWiseIP.

--Rushi
ZurdoDev 17-Feb-14 21:31pm    
Your question is not clear but it sounds liek DatreWiseIP may not be a class.

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