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.Odbc; using System.Data.SqlClient; using CrystalDecisions.CrystalReports.Engine; using CrystalDecisions.Shared; using CrystalDecisions.ReportSource; using System.Data.OleDb; using System.Collections; namespace Graduation { public partial class Form1 : Form { public Form1() { InitializeComponent(); } private void Form1_Load(object sender, EventArgs e) { // TODO: This line of code loads data into the 'DSReport.GRADUATION' table. You can move, or remove it, as needed. this.GRADUATIONTableAdapter.Fill(this.DSReport.GRADUATION); // this.RV1.RefreshReport(); } private void button1_Click(object sender, EventArgs e) { if (textBox1.Text == "") { MessageBox.Show("Plese Inter Student's ID"); textBox1.Focus(); } else { OleDbConnection con = new OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=D:D:\\Graduation System\\Graduation System\\bin\\Debug\\StudentsDB.mdb"); OleDbDataAdapter ad = new OleDbDataAdapter("select STDID, FName, LName, DOB, Nationality, GRADUDATE, GRADE from GRADUATION where STDID='" + textBox1.Text + "'", con); DataSet ds = new DataSet(); ad.Fill(ds, "GRAD"); ReportDocument cryRpt = new ReportDocument(); cryRpt.Load(Application.StartupPath + "GraduationCertificate.rpt"); CRV1.ReportSource = (ds.Tables["GRAD"]); CRV1.Refresh(); } } } }
cryRpt.Load("D:\\Graduation System\\Graduation System\\GraduationCertificate.rpt");
cryRpt.Load(Server.MapPath("GraduationCertificate.rpt"));
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)