Пример #1
0
 private void prnt_all_Click(object sender, EventArgs e)
 {
     RPRT.CrystalReport_All_CAT cats = new RPRT.CrystalReport_All_CAT();
     RPRT.PRNT_SNGL_PRD         frm  = new RPRT.PRNT_SNGL_PRD();
     cats.Refresh();
     frm.crystalReportViewer1.ReportSource = cats;
     frm.Text = "Print All Categories";
     frm.Show();
 }
Пример #2
0
        private void sveAllCats_Click(object sender, EventArgs e)
        {
            RPRT.CrystalReport_All_CAT cat  = new RPRT.CrystalReport_All_CAT();
            ExportOptions export            = new ExportOptions();
            DiskFileDestinationOptions Dist = new DiskFileDestinationOptions();
            PdfFormatOptions           pdf  = new PdfFormatOptions();

            Dist.DiskFileName = @"C: \Users\hima\Desktop\\PDF_All_Cat.pdf";

            export = cat.ExportOptions;
            export.ExportDestinationType    = ExportDestinationType.DiskFile;
            export.ExportFormatType         = ExportFormatType.PortableDocFormat;
            export.ExportFormatOptions      = pdf;
            export.ExportDestinationOptions = Dist;
            cat.Refresh();
            cat.Export();

            MessageBox.Show("File Exported on Desktop Successfully", "INFO", MessageBoxButtons.OK);
        }