private void exportToPdfAll_Click(object sender, EventArgs e)
        {
            RPT.rpt_all_categories myReport = new RPT.rpt_all_categories();

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

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

            PdfFormatOptions pdfformat = new PdfFormatOptions();

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

            export = myReport.ExportOptions;

            export.ExportDestinationType = ExportDestinationType.DiskFile;

            export.ExportFormatType = ExportFormatType.PortableDocFormat;

            export.ExportFormatOptions      = pdfformat;
            export.ExportDestinationOptions = dfoptions;

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

            MessageBox.Show("List Eported Successfully ", "Export", MessageBoxButtons.OK, MessageBoxIcon.Information);
        }
 private void btnPrinAll_Click(object sender, EventArgs e)
 {
     RPT.rpt_all_categories rpt = new RPT.rpt_all_categories();
     RPT.FRM_RPT_PRODUCT    frm = new RPT.FRM_RPT_PRODUCT();
     rpt.Refresh();
     frm.crystalReportViewer1.ReportSource = rpt;
     frm.ShowDialog();
 }
示例#3
0
 private void btnPrintAll_Click(object sender, EventArgs e)
 {
     RPT.rpt_all_categories my_report_all_cat = new RPT.rpt_all_categories();
     RPT.FRM_RPT_PRODUCTcs  mForm             = new RPT.FRM_RPT_PRODUCTcs();
     my_report_all_cat.Refresh();
     mForm.crystalReportViewer1.ReportSource = my_report_all_cat;
     mForm.ShowDialog();
 }
示例#4
0
        private void btnPrinAll_Click(object sender, EventArgs e)
        {
            try
            {
                this.Cursor = Cursors.WaitCursor;

                RPT.rpt_all_categories rpt = new RPT.rpt_all_categories();
                RPT.FRM_RPT_PRODUCT    frm = new RPT.FRM_RPT_PRODUCT();
                rpt.Refresh();
                frm.crystalReportViewer1.ReportSource = rpt;
                frm.ShowDialog();
                this.Cursor = Cursors.Default;
            }
            catch {
                MessageBox.Show("الرجاء تحديث المعلومات", "تنبية", MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
        }
示例#5
0
        private void exportToPdfAll_Click(object sender, EventArgs e)
        {
            RPT.rpt_all_categories myrep_all_categories_to_pdf = new RPT.rpt_all_categories();
            //Create export options
            ExportOptions export = new ExportOptions();
            //Create object to save destination
            DiskFileDestinationOptions dfOptions = new DiskFileDestinationOptions();
            PdfFormatOptions           pdfFormat = new PdfFormatOptions();

            // set destination name
            dfOptions.DiskFileName = @"T:\FCAI\My Projects\DB\CategoriesList.pdf";
            export = myrep_all_categories_to_pdf.ExportOptions;
            export.ExportDestinationType    = ExportDestinationType.DiskFile;
            export.ExportFormatType         = ExportFormatType.PortableDocFormat;
            export.ExportFormatOptions      = pdfFormat;
            export.ExportDestinationOptions = dfOptions;
            myrep_all_categories_to_pdf.Refresh();
            myrep_all_categories_to_pdf.Export();
            MessageBox.Show("تم تصدير جميع الاصناف الى ملف PDF.", "تصدير PDF", MessageBoxButtons.OK, MessageBoxIcon.Information);
        }
示例#6
0
        private void btnSaveAll_Click(object sender, EventArgs e)
        {
            RPT.rpt_all_categories rpt    = new RPT.rpt_all_categories();
            ExportOptions          export = new ExportOptions();

            export = rpt.ExportOptions;

            DiskFileDestinationOptions dfoptions = new DiskFileDestinationOptions();
            string PdfReportsPath = Application.StartupPath.Substring(0, (Application.StartupPath.Length - 10)) + @"\PdfReports\";

            dfoptions.DiskFileName          = PdfReportsPath + "AllCategoryList-" + DateTime.Now.ToString("dddd, dd MMMM yyyy") + ".pdf";
            export.ExportDestinationOptions = dfoptions;
            export.ExportDestinationType    = ExportDestinationType.DiskFile;

            PdfFormatOptions pdf = new PdfFormatOptions();

            export.ExportFormatOptions = pdf;
            export.ExportFormatType    = ExportFormatType.PortableDocFormat;
            rpt.Refresh();
            rpt.Export();
            MessageBox.Show("All Category List Exported Successfully", "Export", MessageBoxButtons.OK, MessageBoxIcon.Information);
        }
        private void exportToPdfAll_Click(object sender, EventArgs e)
        {
            RPT.rpt_all_categories myReport = new RPT.rpt_all_categories();

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

            //Create Object For destination
            DiskFileDestinationOptions dfoptions = new DiskFileDestinationOptions();

            //Create Object For Excel Format
            PdfFormatOptions pdfformat = new PdfFormatOptions();

            //Set the path of destination
            dfoptions.DiskFileName = @"E:\CategoriesList.pdf";

            //Set Report Options to crystal export options
            export = myReport.ExportOptions;

            //Set Destination type
            export.ExportDestinationType = ExportDestinationType.DiskFile;

            //Set the type of document
            export.ExportFormatType = ExportFormatType.PortableDocFormat;

            //format the excel document
            export.ExportFormatOptions = pdfformat;

            //Set Destination option
            export.ExportDestinationOptions = dfoptions;

            myReport.Refresh();
            //Export the report
            myReport.Export();

            MessageBox.Show("List Exported Successfully !", "Export", MessageBoxButtons.OK, MessageBoxIcon.Information);
        }