Click here to Skip to main content
15,893,668 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Dear Frnd,

I have error in crystal report coding not instance of an object(DateWiseIP missing directive or assembly reference)

please help me..

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 17-Feb-14 3:08am
v2
Comments
♥…ЯҠ…♥ 17-Feb-14 7:53am    
DateWiseIP where it is? have you referenced this class in your project?
vignesh war 17-Feb-14 8:12am    
C center of that code(DateWiseIP t2=new DateWiseIP() is that problem
vignesh war 17-Feb-14 8:13am    
another thing DateWiseIP is a crystal report name.
JoCodes 17-Feb-14 9:10am    
Check whether DateWiseIP is referenced in your project
vignesh war 17-Feb-14 23:44pm    
How referenced DateWiseIP

1 solution

It sounds like your Crystal Report project is an external project to this piece of code. If it's part of the same solution, you can add it in as an assembly reference. If not, you will need to add the DLL that contains this functionality using the Browse operation. In either case, right click on your References node in this project in the Solution Explorer. Choose Add reference... from the popup.
 
Share this answer
 
Comments
vignesh war 17-Feb-14 23:19pm    
What reference I add in that..

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