Israel

Israel

  • 640
  • 1.3k
  • 215.4k

My report doesnt appear...

May 20 2014 9:25 AM
Hi!

Please give me a help. I would love to see my report appearing with datas. But when I run my program it's giving me this message:


could not load file or assembly 'file:///c:\Program Files (x86)\
SAP BusinessObjects\Crystal Reports for .Net Framework 4.0\
Common\SAP Businessobjects Entreprise XI 4.0\win2_x86\dotnet1\
crdb_adoplus.dll or one of its dependencies. The system 
doesnt find the specific file.
 
 
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.Sql;
using System.Data.SqlClient;
using CrystalDecisions.CrystalReports.Engine;
 
namespace WindowsFormsApplication1
{
    public partial class Form1 : Form
    {
 
        SqlConnection conn = new SqlConnection("Data Source=localhost\\sqlexpress;Initial Catalog=master;Integrated Security=True");
        public Form1()
        {
            InitializeComponent();
        }
 
        private void Form1_Load(object sender, EventArgs e)
        {
            conn.Open();
            SqlCommand com = new SqlCommand("select * from tbl_products", conn);
            com.CommandType = CommandType.Text;
            SqlDataAdapter sdt = new SqlDataAdapter(com);
            DataTable ds = new DataTable();
            sdt.Fill(ds);
            CrystalReport1 crp = new CrystalReport1();
            crp.SetDataSource(ds);
            crystalReportViewer1.Refresh();
            conn.Close();
        }
    }
}
 

Answers (7)