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();
}
}
}
Loading
VulpesPosted May 21, 2014, 7:37 AM
However, if I were to use such a system, I think I'd prefer the ReportViewer control to Crystal reports.
Mahesh Chand has written a number of articles, plus a book, on using this control and I'd check out the links here (you'll need to refine by author to get Mahesh's stuff in isolation):
http://www.c-sharpcorner.com/tags/1/reportviewer
IsraelPosted May 21, 2014, 6:38 AM
VulpesPosted May 21, 2014, 5:14 AM
IsraelPosted May 21, 2014, 4:30 AM
VulpesPosted May 20, 2014, 5:04 PM
Many applications I write produce raw data which clients or their advisers then process. If I'm asked to do something myself I'd import the data into Excel and produce a basic report from that. The client can then customize the report if needed.
IsraelPosted May 20, 2014, 12:04 PM
VulpesPosted May 20, 2014, 10:15 AM
http://crystal622.rssing.com/chan-5903591/all_p45.html