private void btnPrint_Click(object sender, EventArgs e) { var lista = EmpresaRepository.GetAll(); if (lista == null || lista.Count == 0) { throw new ErrorMessageException("É necessário realizar o cadastro da Empresa em COnfigurações"); } _empresa = lista[0]; //imgLoop.Visible = true; this.Enabled = false; //string path = @"Projeto_Pedido.Reports.ReportPedido.rdlc"; if (this.reportViewer == null) { this.reportViewer = new ReportViewer(); } this.reportViewer.LocalReport.DataSources.Add(new ReportDataSource("DataSet2", listagemImpressao)); string path = @"Projeto_Pedido.Reports.ReportPedido.rdlc"; frmReport = new FormReport(this.reportViewer, path, GetParametersToPrint()); this.Enabled = true; frmReport.ShowDialog(); }
private void btnPrint_Click(object sender, EventArgs e) { try { var lista = EmpresaRepository.GetAll(); if (lista == null || lista.Count == 0) { throw new ErrorMessageException("É necessário realizar o cadastro da Empresa em COnfigurações"); } _empresa = lista[0]; string path = @"Projeto_Pedido.Reports.ImpressaoPedido.rdlc"; if (this.reportViewer == null) { this.reportViewer = new ReportViewer(); } var listItens = _pedido.ItensPedido; this.reportViewer.LocalReport.DataSources.Add(new ReportDataSource("DataSet2", listItens)); FormReport frmReport = new FormReport(this.reportViewer, path, GetParametersToPrint()); frmReport.ShowDialog(); } catch (ErrorMessageException eme) { MessageBox.Show(eme.Message, "Aviso", MessageBoxButtons.OK, MessageBoxIcon.Information); } catch (Exception ex) { } }
private void ShowReport(object obj) { Debug.WriteLine(" ShowReport(object obj)"); var m = obj as ModuleBox; var arr = _mBox.ApplicationOptions.FilePatterns; var arrIndx = new int[arr.Count]; foreach (var au in m.ListReportAudit) { foreach (var fw in au.FindWords) { arrIndx[fw.WordIndexArr] += fw.CountInFile; } } m.ListReportAudit.Clear(); List <string> report = new List <string>(); string str = "\n\rЗнайдені слова:"; for (int i = 0; i < arrIndx.Length; i++) { str += $"\n\r{_mBox.ApplicationOptions.FilePatterns[i]} - {arrIndx[i]} раз."; } for (int i = 0; i < lbx_AuditMonitor.Items.Count; i++) { str += "\r\n" + lbx_AuditMonitor.Items[i].ToString(); } str += $"\r\n Пушук збережено у файлі: {_mBox.ApplicationOptions.PathToCopyFile + @"\Report.txt"}"; lbx_AuditMonitor.Items.Clear(); FormReport fr = new FormReport(str); fr.ShowDialog(); }
private void btnExportarExcel_Click(object sender, EventArgs e) { try { report.ShowDialog(); } catch (Exception ex) { MessageBox.Show(ex.Message); } }
internal static void Click(DTE dte) { try { dte.StatusBar.Animate(true, vsStatusAnimation.vsStatusAnimationDeploy); if (UtilityPackage.GetCrmServiceClient(dte)) { var crmServiceClient = (CrmServiceClient)UtilityPackage.GetGlobal("CrmServiceClient", dte); var crmUrl = (string)UtilityPackage.GetGlobal("CrmUrl", dte); UtilityPackage.SetDTEStatusBar(dte, $"[{crmUrl}] Connected"); var fullFileName = dte.SelectedItems.Item(1).ProjectItem.FileNames[0]; var cacheReportFromVS = GetCacheReportFromVS(dte, fullFileName); if (cacheReportFromVS == null) { var cacheReportFromFile = GetCacheReportFromFile(fullFileName); var formReport = new FormReport(crmServiceClient, cacheReportFromFile); if (formReport.ShowDialog() == DialogResult.OK) { var language = formReport.Language; var solution = formReport.Solution; var reportName = formReport.ReportName; var reportId = formReport.ReportId; DoDeployReport(dte, crmServiceClient, reportId, fullFileName); AddToCache(dte, language, solution, reportName, reportId, fullFileName); } } else { DoDeployReport(dte, crmServiceClient, cacheReportFromVS.Value, fullFileName); } } dte.StatusBar.Animate(false, vsStatusAnimation.vsStatusAnimationDeploy); } catch { UtilityPackage.SetDTEStatusBarAndStopAnimate(dte, "Deploy WebResource failed"); } }
private void relatórioToolStripMenuItem_Click(object sender, EventArgs e) { FormReport formReport = new FormReport(); formReport.ShowDialog(); }