public boolean finish() { StoreName = getStoreName(); if (!CurReportDocument.getRecordParser() .getReportDocuments() .hasByHierarchicalName(StoreName)) { try { CurReportDocument.store(StoreName, getReportOpenMode()); ReportWizard.bCloseDocument = false; return true; } catch (Exception e) { CurUnoDialog.showMessageBox("ErrorBox", VclWindowPeerAttribute.OK, e.getLocalizedMessage()); CurUnoDialog.enableFinishButton(false); return false; } } String sMsgReportDocumentNameDuplicate = CurUnoDialog.m_oResource.getResText(UIConsts.RID_REPORT + 76); String sShowMsgReportNameisDuplicate = JavaTools.replaceSubString(sMsgReportDocumentNameDuplicate, StoreName, "%REPORTNAME"); /* int iMsg = */ CurUnoDialog.showMessageBox( "ErrorBox", VclWindowPeerAttribute.OK, sShowMsgReportNameisDuplicate); CurUnoDialog.enableFinishButton(false); return false; }
/** This function is called if one of the radio buttons is pressed */ private void toggleSubTemplateControls() { // String sStorePath = PropertyNames.EMPTY_STRING; Short iState = (Short) CurUnoDialog.getControlProperty( "optCreateReportTemplate", PropertyNames.PROPERTY_STATE); boolean bDoTemplateEnable = iState.shortValue() == 1; CurUnoDialog.setControlProperty( "optEditTemplate", PropertyNames.PROPERTY_ENABLED, bDoTemplateEnable); CurUnoDialog.setControlProperty( "optUseTemplate", PropertyNames.PROPERTY_ENABLED, bDoTemplateEnable); CurUnoDialog.setControlProperty( "lblHowProceed", PropertyNames.PROPERTY_ENABLED, bDoTemplateEnable); String sTitle = xTitleTextBox.getText(); boolean bDoEnable = sTitle.equals(PropertyNames.EMPTY_STRING); CurUnoDialog.enableFinishButton(!bDoEnable); }
private void changeReportTitle() { final String TitleName = xTitleTextBox.getText(); CurReportDocument.liveupdate_updateReportTitle(TitleName); CurUnoDialog.enableFinishButton(!PropertyNames.EMPTY_STRING.equals(TitleName)); }