Example #1
0
 private void btnPrint_Click(object sender, EventArgs e)
 {
     RPT.RPT_Form  obj = new RPT.RPT_Form();
     RPT.rpt_order rpt = new RPT.rpt_order();
     rpt.SetParameterValue("@ID_Order", int.Parse(dataGridView1.SelectedRows[0].Cells[0].Value.ToString()));
     obj.crystalReportViewer1.ReportSource = rpt;
     obj.ShowDialog();
 }
Example #2
0
 private void btnPrintAll_Click(object sender, EventArgs e)
 {
     RPT.rpt_all_categories rpt = new RPT.rpt_all_categories();
     RPT.RPT_Form           frm = new RPT.RPT_Form();
     rpt.Refresh();
     frm.crystalReportViewer1.ReportSource = rpt;
     frm.ShowDialog();
 }
Example #3
0
 private void btnPrintPro_Click(object sender, EventArgs e)
 {
     RPT.rpt_single_product myReport = new RPT.rpt_single_product();
     myReport.SetParameterValue("@id", dataGridView1.SelectedRows[0].Cells[0].Value.ToString());
     RPT.RPT_Form frm = new RPT.RPT_Form();
     myReport.Refresh(); // in the Main Report view if save data in the report is checked and the report is changeable we should call Refresh()
     frm.crystalReportViewer1.ReportSource = myReport;
     frm.ShowDialog();
 }
Example #4
0
        private void btnPrintCat_Click(object sender, EventArgs e)
        {
            // here print the category with its product in that report we use save data to report checked and also we didn't call Refresh()
            // although the report is changeable but he work will because the sub report that we use in it is call Refresh()

            RPT.rpt_single_category rpt = new RPT.rpt_single_category();
            RPT.RPT_Form            frm = new RPT.RPT_Form();
            rpt.SetParameterValue("@id", Convert.ToInt32(txtCatId.Text));
            frm.Refresh();
            frm.crystalReportViewer1.ReportSource = rpt;
            frm.ShowDialog();
        }