Click here to Skip to main content
15,901,373 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hi all

I got an error while generating the report
error like


Error 2 The type or namespace name 'ReportDocument' could not be found (are you missing a using directive or an assembly reference?) E:\New folder\Vinay\FB_BILLING\FBB_Reports.cs 23 9



Error 3 The type or namespace name 'Tables' could not be found (are you missing a using directive or an assembly reference?) E:\New folder\Vinay\FB_BILLING\FBB_Reports.cs 24 9 FB_BILLING

Error 5 The type or namespace name 'TableLogOnInfos' could not be found (are you missing a using directive or an assembly reference?) E:\New folder\Vinay\FB_BILLING\FBB_Reports.cs 26 9 FB_BILLING

Error 7 The type or namespace name 'ConnectionInfo' could not be found (are you missing a using directive or an assembly reference?) E:\New folder\Vinay\FB_BILLING\FBB_Reports.cs 28 9 FB_BILLING


even I include directives like
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Data.SqlClient;
using CrystalDecisions.CrystalReports.Engine;
using CrystalDecisions.Shared;
using System.IO;


Please tell what mistake might be happen.
Posted
Comments
[no name] 28-Jan-13 4:48am    
Are you added the reference dll's or not..?
Trics071 28-Jan-13 4:51am    
will you post source code

Hi
you have not mansion namespace in beginning of the code block

Try this.

C#
using CrystalDecisions.CrystalReports.Engine;

// This is for CrystalReport "ReportDocument" keyword



if above line of code not work then you should have to add dll or name space to your project or install crystal report.

Hope this will Help you.

Don't forgot to mark this as solution if it is.

Happy Codding...
Nayan Chavada
 
Share this answer
 
Comments
Naveen020190 19-Aug-15 3:10am    
public Article GetArticle(long id) // error - The type or namespace name 'Article' could not be found (are you missing a using directive or an assemble reference?)
{
List articles = QueryList("select * from [product] where [ID] = " + id.ToString());

// Only return the first record.
if (articles.Count > 0)
{
return articles[0];
}
return null;
}
Are you added the reference dll's or not...?

If you forgot to add the dll's , please be added .

If already the dll has been added , then please check it that, is it added in exact location or not.
 
Share this answer
 
v3
Comments
ImtiyazSoft 12-Nov-19 2:21am    
which dll ??
rpt1 custReport = new rpt1(); You can't use the rpt1 directly..

try like this

{
ReportDocument rpt = new ReportDocument();
rpt.Load(@"C:\rp1.rpt");
rpt.Database.Tables[0].SetDataSource(ds_xml);
crystalReportViewer1.ReportSource = rpt;
}
 
Share this answer
 
using CrystalDecisions.CrystalReports.Engine;

// This is for CrystalReport "ReportDocument" keyword
 
Share this answer
 

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