Click here to Skip to main content
13,352,280 members (69,022 online)
Rate this:
 
Please Sign up or sign in to vote.
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 27-Jan-13 23:45pm
Comments
pranathis012 28-Jan-13 4:48am
   
Are you added the reference dll's or not..?
Trilochan Tripathi 28-Jan-13 4:51am
   
will you post source code
Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 4

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

Try this.

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
  Permalink  
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;
}
Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 1

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.
  Permalink  
v3
Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 2

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;
}
  Permalink  
Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 3

using CrystalDecisions.CrystalReports.Engine;

// This is for CrystalReport "ReportDocument" keyword
  Permalink  

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month


Advertise | Privacy |
Web04 | 2.8.180111.1 | Last Updated 21 Dec 2013
Copyright © CodeProject, 1999-2018
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100