Exemple #1
0
        private void metroButton7_Click(object sender, EventArgs e)
        {
            RPT.rpt_all_products myReport = new RPT.rpt_all_products();

            // Create Export options
            ExportOptions export = new ExportOptions();

            // Create object for destination
            DiskFileDestinationOptions dfoptions = new DiskFileDestinationOptions();

            ExcelFormatOptions excelformat = new ExcelFormatOptions();

            // Set the path of destination
            dfoptions.DiskFileName = @"D:\scienses\life with c#\projects\Products Managemnt\Reports\ProductsList.xls";

            export = myReport.ExportOptions;

            export.ExportDestinationType = ExportDestinationType.DiskFile;

            export.ExportFormatType = ExportFormatType.Excel;

            export.ExportFormatOptions      = excelformat;
            export.ExportDestinationOptions = dfoptions;

            myReport.Refresh();
            myReport.Export();

            MessageBox.Show("List Eported Successfully ", "Export", MessageBoxButtons.OK, MessageBoxIcon.Information);
        }
Exemple #2
0
 private void button6_Click(object sender, EventArgs e)
 {
     RPT.rpt_all_products  my_report_all = new RPT.rpt_all_products();
     RPT.FRM_RPT_PRODUCTcs mForm         = new RPT.FRM_RPT_PRODUCTcs();
     my_report_all.Refresh();
     mForm.crystalReportViewer1.ReportSource = my_report_all;
     mForm.ShowDialog();
 }
Exemple #3
0
 private void btnPrintAllPro_Click(object sender, EventArgs e)
 {
     RPT.rpt_all_products rpt = new RPT.rpt_all_products();
     RPT.RPT_Form         frm = new RPT.RPT_Form();
     rpt.Refresh();
     frm.crystalReportViewer1.ReportSource = rpt;
     frm.ShowDialog();
 }