private void button1_Click(object sender, EventArgs e) { XRDesignFormEx designerForm = new XRDesignFormEx(); designerForm.OpenReport(report); designerForm.DesignPanel.ExecCommand(ReportCommand.ShowPreviewTab); designerForm.ShowDialog(); designerForm.OpenReport((XtraReport)null); designerForm.Dispose(); }
private void button5_Click(object sender, EventArgs e) { XRDesignFormEx designerForm = new XRDesignFormEx(); designerForm.OpenReport(report); StyleSheetEditorForm ssef = new StyleSheetEditorForm(report, null); ssef.ShowDialog(); designerForm.OpenReport((XtraReport)null); designerForm.Dispose(); }
private void editPrint() { string path; DevExpress.XtraReports.UI.XtraReport rptTmp = null; if (Config.GetValue("DuongDanBaoCao") != null) { path = Config.GetValue("DuongDanBaoCao").ToString() + "\\" + Config.GetValue("Package").ToString() + "\\" + "billPOS.repx"; } else { path = Application.StartupPath + "\\Reports\\" + Config.GetValue("Package").ToString() + "\\" + "billPOS.repx"; } if (System.IO.File.Exists(path)) { rptTmp = DevExpress.XtraReports.UI.XtraReport.FromFile(path, true); } else { rptTmp = new DevExpress.XtraReports.UI.XtraReport(); } if (rptTmp != null) { rptTmp.DataSource = _cban.tb; XRDesignFormEx designForm = new XRDesignFormEx(); designForm.OpenReport(rptTmp); if (System.IO.File.Exists(path)) { designForm.FileName = path; } designForm.KeyPreview = true; designForm.Show(); } }
public void Yazdirr(string DosyaAdi, Nasil NasilAcsin) { try { Rapor = new XtraReport(); Rapor.LoadLayout(DosyaAdi); Rapor.DataSource = ds; switch (NasilAcsin) { case Nasil.dizayn: XRDesignFormEx XrDesigner = new XRDesignFormEx() { FileName = DosyaAdi }; XrDesigner.OpenReport(Rapor); XrDesigner.Show(); break; case Nasil.Goster: Rapor.ShowPreview(); break; case Nasil.Yazdir: Rapor.Print(); break; } } catch (Exception hata) { frmHataBildir frmHataBildir = new frmHataBildir(hata.Message, hata.StackTrace); frmHataBildir.ShowDialog(); } }
private void ShowDesigner() { XRDesignFormEx designer = new XRDesignFormEx(); XtraReport r = new XtraReport(); r.DesignerLoaded += new DesignerLoadedEventHandler(r_DesignerLoaded); designer.OpenReport(r); designer.ShowDialog(); }
private void mbtnDizayn_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) { XRDesignFormEx XrDesigner = new XRDesignFormEx(); XrDesigner.FileName = Application.StartupPath + "\\ReportDesigners\\Fatura\\rptFatura.repx"; XrDesigner.OpenReport(RaporStokGiris()); XrDesigner.Show(); }
private void EditReport(DataTable tb) { if (tb == null) { return; } DataTable dataPrint = tb; DevExpress.XtraReports.UI.XtraReport rptTmp = null; string path; if (Config.GetValue("DuongDanBaoCao") != null) { path = Config.GetValue("DuongDanBaoCao").ToString() + "\\" + Config.GetValue("Package").ToString() + "\\" + fileReport + ".repx"; } else { path = Application.StartupPath + "\\Reports\\" + Config.GetValue("Package").ToString() + "\\" + fileReport + ".repx"; } string pathTmp; if (Config.GetValue("DuongDanBaoCao") != null) { pathTmp = Config.GetValue("DuongDanBaoCao").ToString() + "\\" + Config.GetValue("Package").ToString() + "\\" + fileReport + ".repx"; } else { pathTmp = Application.StartupPath + "\\" + Config.GetValue("Package").ToString() + "\\Reports\\template.repx"; } if (System.IO.File.Exists(path)) { rptTmp = DevExpress.XtraReports.UI.XtraReport.FromFile(path, true); } else if (System.IO.File.Exists(pathTmp)) { rptTmp = DevExpress.XtraReports.UI.XtraReport.FromFile(pathTmp, true); } else { rptTmp = new DevExpress.XtraReports.UI.XtraReport(); } if (rptTmp != null) { rptTmp.DataSource = dataPrint; XRDesignFormEx designForm = new XRDesignFormEx(); designForm.OpenReport(rptTmp); if (System.IO.File.Exists(path)) { designForm.FileName = path; } designForm.KeyPreview = true; designForm.KeyDown += new KeyEventHandler(designForm_KeyDown); designForm.Show(); } }
private void simpleButton2_Click(object sender, EventArgs e) { XRDesignFormEx XrDesigner = new XRDesignFormEx(); XrDesigner.FileName = "50ye30 ruhuna fatiha.repx"; //XrDesigner.OpenReport(@"C:\AresRapor\StokEtiket\50ye30 ruhuna fatiha.repx"); XrDesigner.OpenReport(rpt); XrDesigner.Show(); }
private void simpleButtonSuaMau_Click(object sender, EventArgs e) { DataTable dtReport = _data.GetDataForPrint(_arrIndex[0]); if (dtReport == null) { return; } DevExpress.XtraReports.UI.XtraReport rptTmp = null; string path; if (Config.GetValue("DuongDanBaoCao") != null) { path = Config.GetValue("DuongDanBaoCao").ToString() + "\\" + Config.GetValue("Package").ToString() + "\\" + _reportFile + ".repx"; } else { path = Application.StartupPath + "\\Reports\\" + Config.GetValue("Package").ToString() + "\\" + _reportFile + ".repx"; } string pathTmp; if (Config.GetValue("DuongDanBaoCao") != null) { pathTmp = Config.GetValue("DuongDanBaoCao").ToString() + "\\" + Config.GetValue("Package").ToString() + "\\" + _reportFile + ".repx"; } else { pathTmp = Application.StartupPath + "\\" + Config.GetValue("Package").ToString() + "\\Reports\\template.repx"; } if (System.IO.File.Exists(path)) { rptTmp = DevExpress.XtraReports.UI.XtraReport.FromFile(path, true); } else if (System.IO.File.Exists(pathTmp)) { rptTmp = DevExpress.XtraReports.UI.XtraReport.FromFile(pathTmp, true); } else { rptTmp = new DevExpress.XtraReports.UI.XtraReport(); } if (rptTmp != null) { rptTmp.DataSource = dtReport; XRDesignFormEx designForm = new XRDesignFormEx(); designForm.OpenReport(rptTmp); if (System.IO.File.Exists(path)) { designForm.FileName = path; } designForm.KeyPreview = true; designForm.KeyDown += new KeyEventHandler(designForm_KeyDown); designForm.Show(); } }
private void ShowReportDesigner() { XRDesignFormEx designForm = new XRDesignFormEx(); designForm.DesignPanel.DesignerHostLoaded += new DesignerLoadedEventHandler(DesignPanel_DesignerHostLoaded); designForm.OpenReport(new XtraReport1()); designForm.ShowDialog(); }
private void button1_Click(object sender, System.EventArgs e) { // Create a new End-User Designer. XRDesignFormEx designForm = new XRDesignFormEx(); // Handle the event when the report is loaded into the End-User Designer. designForm.DesignPanel.DesignerHostLoaded += new DesignerLoadedEventHandler(OnDesignerLoaded); // Load the report into the designer. designForm.OpenReport(new XtraReport1()); // Show the End-User Designer window. designForm.Show(); }
private void Form1_Load(object sender, EventArgs e) { // Create a new End-User Designer. XRDesignFormEx designForm = new XRDesignFormEx(); // Handle the event when the report is loaded into the End-User Designer. designForm.DesignPanel.DesignerHostLoaded += new DesignerLoadedEventHandler(OnDesignerLoaded); // Load the report into the designer. designForm.OpenReport(new SampleReport()); // Show the End-User Designer window. designForm.ShowDialog(); }
private void btnDiseño_Click(object sender, EventArgs e) { XtraReport report = new XtraReport { DataSource = DataSource }; report.LoadLayout(FileName); XRDesignFormEx xrDfe = new XRDesignFormEx(); xrDfe.OpenReport(report); xrDfe.DesignPanel.FileName = FileName; xrDfe.WindowState = FormWindowState.Maximized; xrDfe.ShowDialog(); }
/// <summary> /// 设计报表 /// </summary> /// <param name="path">报表模板的路径</param> public void XtraReport_Designer(XtraReport report, string path) { XRDesignFormEx designForm = new XRDesignFormEx(); designForm.DesignPanel.SetCommandVisibility(new ReportCommand[] { ReportCommand.NewReport, ReportCommand.SaveFileAs, ReportCommand.NewReportWizard, ReportCommand.OpenFile }, DevExpress.XtraReports.UserDesigner.CommandVisibility.None); designForm.OpenReport(report); designForm.FileName = path; designForm.ShowDialog(); designForm.Dispose(); }
public void EditForm() { if (rptTmp != null) { rptTmp.DataSource = db; XRDesignFormEx designForm = new XRDesignFormEx(); designForm.OpenReport(rptTmp); if (System.IO.File.Exists(path)) { designForm.FileName = path; } designForm.KeyPreview = true; designForm.KeyDown += new KeyEventHandler(designForm_KeyDown); designForm.Show(); } }
private void simpleButton3_Click(object sender, EventArgs e) { DevExpress.XtraReports.UI.XtraReport rptTmp = null; string reportFile, title; reportFile = DuongDanInvoice + "\\HoaDonMau.repx"; if (System.IO.File.Exists(reportFile) && Data != null) { rptTmp = DevExpress.XtraReports.UI.XtraReport.FromFile(reportFile, true); rptTmp.DataSource = Data.Tables[1].Clone(); XRDesignFormEx designForm = new XRDesignFormEx(); designForm.OpenReport(rptTmp); designForm.KeyPreview = true; //designForm.KeyDown += new KeyEventHandler(designForm_KeyDown); designForm.Show(); } }
private void simpleButton1_Click(object sender, EventArgs e) { XtraReport1 xr = new XtraReport1(); // Assign the report's data source which is the collection of Task objects. AppointmentBaseCollection abc = schedulerStorage1.GetAppointments(schedulerControl1.ActiveView.GetVisibleIntervals()); TaskCollection tc = new TaskCollection(); tc.AddAppointmentRange(abc); xr.DataSource = tc; // Create a report and preview it. xr.CreateDocument(); XRDesignFormEx designForm = new XRDesignFormEx(); designForm.OpenReport(xr); designForm.DesignPanel.SelectedTabIndex = 1; designForm.ShowDialog(); }
void FormuDuzenle(string dosyaYolu) { try { using (XtraReport DuzenlenecekRapor = new XtraReport()) { DuzenlenecekRapor.LoadLayout(dosyaYolu); DuzenlenecekRapor.DataSource = ds; XRDesignFormEx XrDesigner = new XRDesignFormEx(); XrDesigner.FileName = dosyaYolu; XrDesigner.OpenReport(DuzenlenecekRapor); XrDesigner.ShowDialog(); } } catch (Exception ex) { throw ex; } }
// public XRDesignFormEx xrd = new XRDesignFormEx(); public MyReport(XtraReport xr, string filePath, bool flag) { SplashScreenManager.ShowForm(typeof(WaitForm1)); string root = @"C:/jdk/reports"; if (File.Exists(Path.Combine(root, filePath))) { object ds = xr.DataSource; xr = new XtraReport(); xr.LoadLayout(Path.Combine(root, filePath)); xr.DataSource = ds; } SplashScreenManager.CloseForm(); if (flag == false) { xr.ShowPreviewDialog(); return; } XRDesignFormEx xrd = new XRDesignFormEx(); xrd.FormClosing += (s, e) => { if (!Directory.Exists(root)) { Directory.CreateDirectory(root); } xr.SaveLayout(Path.Combine(root, filePath)); }; xrd.ReportStateChanged += (s, e) => { if (e.ReportState == ReportState.Changed) { ((XRDesignFormEx)s).DesignPanel.ReportState = ReportState.Saved; } }; xrd.OpenReport(xr); xrd.ShowDialog(); xrd.Dispose(); }
private void ProcessReport(ReportAction action) { switch (action) { case ReportAction.Print: RaporStokGiris().PrintDialog(); break; case ReportAction.Preview: RaporStokGiris().ShowPreview(); break; case ReportAction.Dizayn: XRDesignFormEx XrDesigner = new XRDesignFormEx(); XrDesigner.FileName = Application.StartupPath + "\\ReportDesigners\\Irsaliye\\rptIrsaliye.repx"; XrDesigner.OpenReport(RaporStokGiris()); XrDesigner.Show(); break; } }
private void button1_Click(object sender, EventArgs e) { // Create an End-User Designer form. XRDesignFormEx form = new XRDesignFormEx(); // Create a report instance. XtraReport1 report = new XtraReport1(); // Add data components to the Designer Host. form.DesignPanel.DesignerHostLoaded += new DesignerLoadedEventHandler(OnDesignerLoaded); // Load the report into the End-User Designer. form.OpenReport(report); // Bind the report to data. report.DataSource = ds; report.DataAdapter = adapter; report.DataMember = "Products"; // Show the End-User Designer form. form.ShowDialog(); }
private void btnRepair_Click(object sender, EventArgs e) { try { var frmDesigner = new XRDesignFormEx(); if (File.Exists(baseRptPath + ".repx")) { var report = XtraReport.FromFile(baseRptPath + ".repx", true); report.XmlDataPath = baseRptPath + ".xml"; frmDesigner.OpenReport(report); frmDesigner.FileName = baseRptPath + ".repx"; frmDesigner.ShowDialog(); } } catch (FaultException ex) { ShowError(ex); } catch (Exception ex) { ShowError(ex); } }
/// <summary> /// Bunda Dizeyn Yok,, Ara belleğe alınan Dosyayı Ywzdırır sürekli ayrnı formdan yazdırma işlemi yapılacaksa hızx açısından bu daha hızlı olur bunu kullan hamısına /// </summary> /// <param name="DosyaAdi"></param> /// <param name="NasilAcsin"></param> /// <param name="YaziciAdi"></param> public void Yazdirr(Nasil NasilAcsin, string YaziciAdi, int CopyaSayisi) { try { ArabellektekiRapor.CreateDocument(true); //NumberOfCopy = CopyaSayisi; // bunun hiç bir manası yok düzenlenmesi gerekiyor. //ArabellektekiRapor.DataSource = ds; using (pt = new ReportPrintTool(ArabellektekiRapor)) { //Rapor.PrintingSystem.ShowMarginsWarning = false; //pt.PrintingSystem.ShowMarginsWarning = false; //pt.PrintingSystem.StartPrint += PrintingSystem_StartPrint; pt.PrinterSettings.Copies = (Int16)CopyaSayisi; if (!string.IsNullOrEmpty(YaziciAdi)) { pt.PrinterSettings.PrinterName = YaziciAdi; try { pt.PrinterSettings.DefaultPageSettings.PaperSource = pt.PrinterSettings.PaperSources[KagitKaynagiIndex]; } catch (Exception) { } } switch (NasilAcsin) { case Nasil.dizayn: XRDesignFormEx XrDesigner = new XRDesignFormEx(); //XrDesigner.FileName = DosyaAdiE; XrDesigner.OpenReport(ArabellektekiRapor); XrDesigner.Show(); break; case Nasil.Goster: pt.ShowPreviewDialog(); break; case Nasil.Yazdir: if (YaziciAdi != string.Empty) { pt.PrinterSettings.PrinterName = YaziciAdi; } pt.Print(); break; case Nasil.YazdirmaDiyalogu: pt.PrintDialog(); break; } } } catch (Exception hata) { //frmHataBildir frmHataBildir = new frmHataBildir(hata.Message, hata.StackTrace); //frmHataBildir.ShowDialog(); } finally { } }
/// <summary> /// /// </summary> /// <param name="DosyaAdi"></param> /// <param name="NasilAcsin"></param> /// <param name="YaziciAdi">boş verilirse varsayılan yazıcıdan yazdırır</param> public void Yazdirr(string DosyaAdi, Nasil NasilAcsin, string YaziciAdi) { try { using (Rapor = new XtraReport()) { Rapor.LoadLayout(DosyaAdi); Rapor.DataSource = ds; using (ReportPrintTool pt = new ReportPrintTool(Rapor)) { //Rapor.PrintingSystem.ShowMarginsWarning = false; //pt.PrintingSystem.ShowMarginsWarning = false; //pt.PrintingSystem.StartPrint += PrintingSystem_StartPrint; pt.PrinterSettings.Copies = (Int16)NumberOfCopy; if (!string.IsNullOrEmpty(YaziciAdi)) { pt.PrinterSettings.PrinterName = YaziciAdi; try { pt.PrinterSettings.DefaultPageSettings.PaperSource = pt.PrinterSettings.PaperSources[KagitKaynagiIndex]; } catch (Exception) { } } switch (NasilAcsin) { case Nasil.dizayn: XRDesignFormEx XrDesigner = new XRDesignFormEx(); XrDesigner.FileName = DosyaAdi; XrDesigner.OpenReport(Rapor); XrDesigner.Show(); break; case Nasil.Goster: pt.ShowPreviewDialog(); break; case Nasil.Yazdir: if (YaziciAdi != string.Empty) { pt.PrinterSettings.PrinterName = YaziciAdi; } pt.Print(); break; case Nasil.YazdirmaDiyalogu: pt.PrintDialog(); break; } } } } catch (Exception hata) { //frmHataBildir frmHataBildir = new frmHataBildir(hata.Message, hata.StackTrace); //frmHataBildir.ShowDialog(); } }
private void simpleButtonSuaMau_Click(object sender, EventArgs e) { if (!bool.Parse(Config.GetValue("Admin").ToString())) { return; } int index = _arrIndex[0]; DataTable dtReport = new DataTable(); try { if (_Script == string.Empty) { dtReport = _data.GetDataForPrint(index); } else { dtReport = _data.GetDataForPrint(index, _Script); } } catch { } if (dtReport == null) { return; } dtReport = AddRecordToData(dtReport); DevExpress.XtraReports.UI.XtraReport rptTmp = null; string path = ""; if (Config.GetValue("DuongDanBaoCao") != null) { path = Config.GetValue("DuongDanBaoCao").ToString() + "\\" + Config.GetValue("DbName").ToString() + "\\" + _reportFile + ".repx"; } else { path = Application.StartupPath + "\\Reports\\" + Config.GetValue("DbName").ToString() + "\\" + _reportFile + ".repx"; } if (drMau == null || (drMau != null && drMau["FileName"] == DBNull.Value)) { string pathTmp; if (Config.GetValue("DuongDanBaoCao") != null) { pathTmp = Config.GetValue("DuongDanBaoCao").ToString() + "\\" + Config.GetValue("DbName").ToString() + "\\" + _reportFile + ".repx"; } else { pathTmp = Application.StartupPath + "\\" + Config.GetValue("DbName").ToString() + "\\Reports\\template.repx"; } if (System.IO.File.Exists(path)) { rptTmp = DevExpress.XtraReports.UI.XtraReport.FromFile(path, true); } else if (System.IO.File.Exists(pathTmp)) { rptTmp = DevExpress.XtraReports.UI.XtraReport.FromFile(pathTmp, true); } else { rptTmp = new DevExpress.XtraReports.UI.XtraReport(); } } else { System.IO.MemoryStream ms = new System.IO.MemoryStream(drMau["FileName"] as byte[]); rptTmp = XtraReport.FromStream(ms, true); } if (rptTmp != null) { rptTmp.DataSource = dtReport; if (drMau != null) { rptTmp.Tag = drMau; } XRDesignFormEx designForm = new XRDesignFormEx(); designForm.OpenReport(rptTmp); designForm.Tag = drMau; if (System.IO.File.Exists(path)) { designForm.FileName = path; } designForm.KeyPreview = true; designForm.KeyDown += new KeyEventHandler(designForm_KeyDown); designForm.FormClosed += designForm_FormClosed; designForm.Show(); } }
private void simpleButtonDesignReport_Click(object sender, EventArgs e) { DevExpress.XtraReports.UI.XtraReport rptTmp = null; string reportFile; if (lcisysFormReport.Visibility == DevExpress.XtraLayout.Utils.LayoutVisibility.Always) { DataTable dtFormReport = lookUpEditsysFormReport.Properties.DataSource as DataTable; DataRow dr = dtFormReport.Rows[lookUpEditsysFormReport.ItemIndex]; reportFile = checkEditNgoaiTe.Checked ? dr["ReportFile2"].ToString() : dr["ReportFile"].ToString(); } else { reportFile = checkEditNgoaiTe.Checked ? _data.DrTable["ReportFile2"].ToString() : _data.DrTable["ReportFile"].ToString(); } string path = ""; if (Config.GetValue("DuongDanBaoCao") != null) { path = Config.GetValue("DuongDanBaoCao").ToString() + "\\" + Config.GetValue("Package").ToString() + "\\" + reportFile + ".repx"; } else { path = Application.StartupPath + "\\Reports\\" + Config.GetValue("Package").ToString() + "\\" + reportFile + ".repx"; } string pathTmp = ""; if (Config.GetValue("DuongDanBaoCao") != null) { pathTmp = Config.GetValue("DuongDanBaoCao").ToString() + "\\" + Config.GetValue("Package").ToString() + "\\" + reportFile + ".repx"; } else { pathTmp = Application.StartupPath + "\\Reports\\" + Config.GetValue("Package").ToString() + "\\" + reportFile + "\\template.repx"; } //string pathTmp = Application.StartupPath + "\\Reports\\" + Config.GetValue("Package").ToString() + "\\template.repx"; if (System.IO.File.Exists(path)) { rptTmp = DevExpress.XtraReports.UI.XtraReport.FromFile(path, true); } else if (System.IO.File.Exists(pathTmp)) { rptTmp = DevExpress.XtraReports.UI.XtraReport.FromFile(pathTmp, true); } else { rptTmp = new DevExpress.XtraReports.UI.XtraReport(); } if (rptTmp != null) { rptTmp.DataSource = gridViewReport.DataSource; if (Config.GetValue("Language").ToString() == "1") { Translate(rptTmp); } XRDesignFormEx designForm = new XRDesignFormEx(); designForm.OpenReport(rptTmp); if (System.IO.File.Exists(path)) { designForm.FileName = path; } designForm.KeyPreview = true; designForm.KeyDown += new KeyEventHandler(designForm_KeyDown); designForm.Show(); } }