Пример #1
0
        private void button11_Click(object sender, EventArgs e)
        {
            RPT.GET_ALL_CATEGORIES myreport = new RPT.GET_ALL_CATEGORIES();
            //creat export options
            ExportOptions export = new ExportOptions();

            //creat object for destination
            DiskFileDestinationOptions Pdfoptions = new DiskFileDestinationOptions();

            PdfFormatOptions PDFformat = new PdfFormatOptions();

            //
            Pdfoptions.DiskFileName = @"D:\CATEGORIESlist.PDF";

            export = myreport.ExportOptions;

            export.ExportDestinationType = ExportDestinationType.DiskFile;

            export.ExportFormatType = ExportFormatType.PortableDocFormat;

            export.ExportFormatOptions = PDFformat;

            export.ExportDestinationOptions = Pdfoptions;
            myreport.Refresh();
            myreport.Export();

            MessageBox.Show("list exported successfully !", "export", MessageBoxButtons.OKCancel, MessageBoxIcon.Information);
        }
Пример #2
0
 private void button9_Click(object sender, EventArgs e)
 {
     RPT.GET_ALL_CATEGORIES rpt = new RPT.GET_ALL_CATEGORIES();
     RPT.FRM_RPT            frm = new RPT.FRM_RPT();
     rpt.Refresh();
     frm.crystalReportViewer1.ReportSource = rpt;
     frm.ShowDialog();
 }