Click here to Skip to main content
16,004,778 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I imported CrystalDecisions.CrystalReports.Engine namespace and i also added refrence of the namespace but still i'm getting this error.

Error 5 The type or namespace name 'CrystalDecisions' could not be found (are you missing a using directive or an assembly reference?

Thx in adv......
Posted

Please add
C#
using CrystalDecisions.Shared;
namespace in ur program... Tell me if u got an error again....
 
Share this answer
 
Comments
Ravi Sargam 27-Feb-12 1:02am    
I added this 3 namespaces

using CrystalDecisions.Shared;
using CrystalDecisions.CrystalReports.Engine;
using CrystalDecisions.ReportSource;

still i am getting error
Shanmugam Rathakrishnan 27-Feb-12 1:27am    
Please show ur full code... i will try and tell u the solution...
Ravi Sargam 27-Feb-12 2:40am    
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Data.SqlClient;
using Schule.Classes;
using CrystalDecisions.Shared;
using CrystalDecisions.CrystalReports.Engine;


namespace ABC
{
public partial class FeesReceiptReport : Form
{
GetDetails obj = new GetDetails();
public FeesReceiptReport()
{
InitializeComponent();
}

private void FeesReceipt_Load(object sender, EventArgs e)
{
DataSet ds = new DataSet();
ReportDocument rd = new ReportDocument();
string sql;

sql = "Select * from Students";
da.Fill(ds, "GetStudents");
rd.Load("F:\\ABC\\ABC\\Reports\\StudList.rpt");
rd.Database.Tables[0].SetDataSource(ds.Tables["GetStudents"]);
this.reportViewer1.RefreshReport();
}
}
}
Shanmugam Rathakrishnan 27-Feb-12 3:39am    
ReportDocument rd = new ReportDocument();
DataSet ds = new DataSet();
SqlDataAdapter da = new SqlDataAdapter();
SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings["sql"].ConnectionString);
rd.Load("E:\\DotNet Projects\\SmsTest\\SmsTest\\CrystalReport1.rpt");
SqlCommand cmd = new SqlCommand("Select * from ClientTable",con);
con.Open();
da = new SqlDataAdapter(cmd);
da.Fill(ds);
crystalReportViewer1.ReportSource = rd;
crystalReportViewer1.Refresh();

code like the above format....
Ravi Sargam 27-Feb-12 3:54am    
hello boss i'm getting same error at

ReportDocument rd = new ReportDocument();
Install MurgeModule Or Publish with MurgeModule of crystalreport .
 
Share this answer
 
Comments
Ravi Sargam 27-Feb-12 0:06am    
thx manoj, Is there any other solution

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