private void button1_Click(object sender, EventArgs e) { if (textBox1.Text == "") { MessageBox.Show("Plese Inter Student's ID"); textBox1.Focus(); } else { OpenFileDialog dlg = new OpenFileDialog(); dlg.Title = "Select Crystal Reports file"; dlg.Filter = "Crystal Reports (*.rpt)|*.rpt|All Files (*.*)|*.*"; dlg.InitialDirectory = "D:\\Graduation System\\Graduation System\\graduatedstudents.rpt"; cryRpt.SetParameterValue("STDID"); CRV1.ReportSource = cryRpt; if (dlg.ShowDialog() == DialogResult.OK) { this.Cursor = Cursors.WaitCursor; CRV1.ReportSource = dlg.FileName; this.Cursor = Cursors.Default; } } }
cryRpt.SetParameterValue("STDID", textBox1.Text);
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)