public int getPrintOptions ( ) throws DBException { int iHtmlOptions = HtmlConstants . HTML_DISPLAY ; if ( ( ( BaseGridScreen ) this . getScreenField ( ) ) . getEditing ( ) ) iHtmlOptions |= HtmlConstants . HTML_INPUT ; String strParamForm = this . getProperty ( HtmlConstants . FORMS ) ; // Display record if ( ( strParamForm == null ) || ( strParamForm . length ( ) == 0 ) ) strParamForm = HtmlConstants . BOTHIFDATA ; // First, move any params up boolean bPrintReport = true ; if ( ( strParamForm . equalsIgnoreCase ( HtmlConstants . INPUT ) ) || ( strParamForm . equalsIgnoreCase ( HtmlConstants . BOTHIFDATA ) ) || ( strParamForm . equalsIgnoreCase ( HtmlConstants . BOTH ) ) ) { // For these options, check to see if the input data has been entered. bPrintReport = false ; boolean bScreenFound = false ; int iNumCols = ( ( BaseGridScreen ) this . getScreenField ( ) ) . getSFieldCount ( ) ; for ( int iIndex = 0 ; iIndex < iNumCols ; iIndex ++ ) { ScreenField sField = ( ( BaseGridScreen ) this . getScreenField ( ) ) . getSField ( iIndex ) ; if ( sField instanceof ToolScreen ) if ( ( ! ( sField instanceof DisplayToolbar ) ) && ( ! ( sField instanceof MaintToolbar ) ) && ( ! ( sField instanceof MenuToolbar ) ) ) { // Output the Input screen HScreenField vField = ( HScreenField ) sField . getScreenFieldView ( ) ; if ( vField . moveControlInput ( Constants . BLANK ) == DBConstants . NORMAL_RETURN ) // I already moved them, but I need to know if they were passed bPrintReport = true ; bScreenFound = true ; } } if ( ! bScreenFound ) bPrintReport = true ; // If no screen, say params were entered if ( ! bPrintReport ) if ( this . getProperty ( DBConstants . STRING_OBJECT_ID_HANDLE ) != null ) bPrintReport = true ; // Special Grid with a header record = found } if ( strParamForm . equalsIgnoreCase ( HtmlConstants . DISPLAY ) ) iHtmlOptions |= HtmlConstants . HTML_DISPLAY ; // No toolbar, print report else if ( strParamForm . equalsIgnoreCase ( HtmlConstants . DATA ) ) iHtmlOptions |= HtmlConstants . PRINT_TOOLBAR_BEFORE ; // Toolbar and report else if ( strParamForm . equalsIgnoreCase ( HtmlConstants . INPUT ) ) iHtmlOptions |= HtmlConstants . PRINT_TOOLBAR_BEFORE | HtmlConstants . DONT_PRINT_SCREEN ; // Toolbar, no report else if ( strParamForm . equalsIgnoreCase ( HtmlConstants . BOTH ) ) iHtmlOptions |= HtmlConstants . PRINT_TOOLBAR_BEFORE ; // Toolbar and report else if ( strParamForm . equalsIgnoreCase ( HtmlConstants . BOTHIFDATA ) ) { iHtmlOptions |= HtmlConstants . PRINT_TOOLBAR_BEFORE ; // Toolscreen is always displayed if ( ! bPrintReport ) iHtmlOptions |= HtmlConstants . DONT_PRINT_SCREEN ; } return iHtmlOptions ; }
display this screen in html input format .