Exemple #1
0
        private void miExcellAktar_Click(object sender, EventArgs e)
        {
            if (dsRapor != null && dsRapor.Tables.Count > 0)
            {
                ArsSQLQry qryCari = new ArsSQLQry();
                qryCari.SQLText = "SELECT CARI_ADI FROM [TBLCARI] WHERE CARI_KODU = '" + CARI_KODU.Text + "'";
                qryCari.Open();

                CariHareketRaporDesign reportDesign = new CariHareketRaporDesign();
                reportDesign.DataSource = dsRapor;
                string folderName = CARI_KODU.Text + " Hesap Ekstresi " + DateTime.Now.Ticks + ".xlsx";
                var    pathFolder = Path.GetDirectoryName(Application.ExecutablePath) + "\\Rapor\\Excell\\" + folderName;
                reportDesign.ExportToXlsx(pathFolder);

                try
                {
                    var pathPdf = Path.GetDirectoryName(Application.ExecutablePath) + "\\Rapor\\Excell\\" + folderName;
                    Process.Start(pathPdf);
                }
                catch (Exception ex)
                {
                    ArsMessage.ShowMessage("Hata", "Dosya Açılamadı");
                }
            }
        }
Exemple #2
0
        private void miPDFOlustur_Click(object sender, EventArgs e)
        {
            if (dsRapor != null && dsRapor.Tables.Count > 0)
            {
                CariHareketRaporDesign reportDesign = new CariHareketRaporDesign();
                reportDesign.DataSource = dsRapor;
                string folderName = CARI_KODU.Text + " Hesap Ekstresi " + DateTime.Now.Ticks + ".pdf";
                var    pathFolder = Path.GetDirectoryName(Application.ExecutablePath) + "\\Rapor\\PDF\\" + folderName;
                reportDesign.ExportToPdf(pathFolder);

                try
                {
                    var pathPdf = Path.GetDirectoryName(Application.ExecutablePath) + "\\Rapor\\PDF\\" + folderName;
                    Process.Start(pathPdf);
                }
                catch (Exception ex)
                {
                    ArsMessage.ShowMessage("Hata", "Dosya Açılamadı");
                }
            }
        }