public bool openDocument(String fileName) { cMouseWait mouse = new cMouseWait(); try { if (!m_report.loadSilent(fileName)) { return(false); } m_report.getLaunchInfo().setStrConnect(m_database); Application.DoEvents(); return(true); } catch (Exception ex) { return(false); } finally { mouse.Dispose(); } }
private void launchReport() { cMouseWait mouse = new cMouseWait(); try { showProgressDlg(); var li = m_report.getLaunchInfo(); li.getPrinter().setPaperInfo(m_report.getPaperInfo()); m_fPrint = new cReportPrint(); m_fPrint.setHidePreviewWindow(true); li.setObjPaint(m_fPrint); // TODO: remove this li.setHwnd(0); li.setShowPrintersDialog(true); m_report.launch(); } catch (Exception ex) { cError.mngError(ex, "launchReport", C_MODULE, ""); } finally { mouse.Dispose(); closeProgressDlg(); } }