invalid report file path


Joined
Sep 14, 2015
Messages
1
Reaction score
0
the problem is hwen hte program run a message is appeared
invaled report file path
make sure that the path is true
thanks for help






using System;

using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using CrystalDecisions.CrystalReports.Engine;

using System.Data.SqlClient;


namespace WindowsFormsApplication4
{
public partial class Form1 : Form
{
ReportDocument crystal = new ReportDocument();


public Form1()
{
InitializeComponent();
}
private void Form1_Load(object sender, EventArgs e)
{

crystal.Load(@" C:\Users\ماجد\documents\visual studio 2012\Projects\WindowsFormsApplication4\WindowsFormsApplication4\CrystalReport1.rpt ");


}

private void button1_Click(object sender, EventArgs e)
{



SqlConnection con = new SqlConnection("data source = (local); initial catalog = bacod; integrated security = true ");
SqlDataAdapter sda = new SqlDataAdapter("select * from products", con);
DataSet ds = new DataSet();
sda.Fill(ds,"products");
crystal.SetDataSource(ds);


crystalReportViewer1.ReportSource = crystal;


}
 
Ad

Advertisements


Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top