Tell report module to print the report detail.
<p>Note: This does not maintain an independent variable, I fake that the screen fields
have been modified, because this signals the report module to print.
@param bPrintReport If true, set print report.
4448
public void setPrintReport(boolean bPrintReport)
    {
        if (bPrintReport)
            if (this.getScreenRecord() != null)   // This tells the RecordHtmlScreen to display the data
                this.getScreenRecord().getField(Constants.MAIN_FIELD).setModified(true);  // Flag screen record, so toolbar knows
    }
383101
public void printDataEndField(PrintWriter out, int iPrintOptions)
    {
        if ((iPrintOptions & HtmlConstants.MAIN_SCREEN) == HtmlConstants.MAIN_SCREEN)
        {
        }
        else 
            out.println("</tr>");
    }
104601
public void printHtmlStartForm(PrintWriter out)
        throws DBException
    {
        String strAction = "post";

        BasePanel modelScreen = (BaseScreen)this.getScreenField();
        int iNumCols = modelScreen.getSFieldCount();
        int iInputCount = 0;
        for (int i = 0; i < iNumCols; i++)
        {
            ScreenField sField = modelScreen.getSField(i);
            if (!sField.isToolbar())
                if (sField.getConverter() != null)
                    if (sField.getConverter().getField() != null)
                    {
                        if (DBParams.PASSWORD.equalsIgnoreCase(sField.getConverter().getField().getFieldName()))
                            iInputCount = 5;    // Always post if password is in the URL
                        iInputCount++;
                    }
        }
        if (iInputCount < 5)
            strAction = "get";
        if (modelScreen instanceof GridScreen)
            if (modelScreen.getEditing() == true)
                strAction = "post";
        out.println("<form action=\"" + modelScreen.getServletPath(null) + "\" method=\"" + strAction + "\">");
        this.addHiddenParams(out, this.getHiddenParams());
    }
313607
public void printDisplayControl(PrintWriter out, String strFieldDesc, String strFieldName, String strFieldType)
    {
        if (this.getScreenField().getConverter() != null)
        {
            this.printInputControl(out, strFieldDesc, strFieldName, null, null, null, "button", strFieldType);   // Button that does nothing?
        }
        else if (this.getScreenField().getParentScreen() instanceof GridScreen)
        { // These are command buttons such as "Form" or "Detail"
            this.printInputControl(out, null, strFieldName, null, null, null, "button", strFieldType);   // Button that does nothing?
        }
    }
1007435
public static void reportBeginImport(I_CmsReport report, String modulePackageName) {

        report.print(Messages.get().container(Messages.RPT_IMPORT_MODULE_BEGIN_0), I_CmsReport.FORMAT_HEADLINE);
        if (report instanceof CmsHtmlReport) {
            report.print(
                org.opencms.report.Messages.get().container(
                    org.opencms.report.Messages.RPT_ARGUMENT_1,
                    "<i>" + modulePackageName + "</i>"));
        } else {
            report.print(
                org.opencms.report.Messages.get().container(
                    org.opencms.report.Messages.RPT_ARGUMENT_1,
                    modulePackageName));
        }
        report.println(org.opencms.report.Messages.get().container(org.opencms.report.Messages.RPT_DOTS_0));
    }
456352
public void setParamTabWpReportType(String value) {

        if (I_CmsReport.REPORT_TYPE_SIMPLE.equals(value) || I_CmsReport.REPORT_TYPE_EXTENDED.equals(value)) {
            // set only if valid parameter value is found
            m_userSettings.setWorkplaceReportType(value);
        }
    }
790328
private void printEditedDetails() {
		StringBuilder buf = new StringBuilder();

		for (Object contact : repeater.getBeanList()) {
			buf.append(contact).append('\n');
		}

		console.setText(buf.toString());
	}
1135384
public void printControlStartForm(PrintWriter out, int iPrintOptions)
    {
        if (((iPrintOptions & HtmlConstants.HEADING_SCREEN) == HtmlConstants.HEADING_SCREEN)
                || ((iPrintOptions & HtmlConstants.FOOTING_SCREEN) == HtmlConstants.FOOTING_SCREEN)
                || ((iPrintOptions & HtmlConstants.DETAIL_SCREEN) == HtmlConstants.DETAIL_SCREEN))
            return; // Don't need on nested forms
        super.printControlStartForm(out, iPrintOptions);
        String strAction = "post";
        BasePanel modelScreen = (BasePanel)this.getScreenField();

//?            strAction = "postxml";
        out.println(Utility.startTag("hidden-params"));
        this.addHiddenParams(out, this.getHiddenParams());
        out.println(Utility.endTag("hidden-params"));
        out.println("<xform id=\"form1\">");
        out.println("   <submission");
        out.println(" id=\"submit1\"");
        out.println(" method=\"" + strAction + "\"");
        out.println(" localfile=\"temp.xml\"");
        out.println(" action=\"" + modelScreen.getServletPath(null) + "\" />");
//?        out.println("  <model href=\"form.xsd\">");
//?        out.println("  <!-- The model is currently ignored -->");
//?        out.println("  </model>");
//?        out.println("  <instance id=\"instance1\" xmlns=\"\">");
    }
280430
public boolean printData(PrintWriter out, int iPrintOptions)
    {
        boolean bFieldsFound = false;
        String strFieldName = this.getScreenField().getSFieldParam();

        String string = DBConstants.BLANK;
        int iIndex = 0;
        Convert converter = this.getScreenField().getConverter();
        if (m_vDisplays == null)
        {
            String strField = null;
            if (converter != null) if (converter.getField() != null)
                strField = converter.getField().getString();
            this.scanTableItems();
            if (converter != null) if (converter.getField() != null)
                converter.getField().setString(strField);
        }
        if (converter != null)
        {   // This is required for the display or popup fields because displayField() is never called to get the value.
            iIndex = converter.convertFieldToIndex();
            if (iIndex == -1)
            {
                return super.printData(out, iPrintOptions);
            }
            try {
                string = (String)m_vDisplays.get(iIndex);
            } catch (ArrayIndexOutOfBoundsException ex) {
                string = DBConstants.BLANK;
            }
        }

        String strFieldData = string; // this.getScreenField().getSFieldValue(true, false);
        if (this.getScreenField().getConverter() != null)
                strFieldData = Utility.encodeXML(strFieldData);
        out.println("    " + Utility.startTag(strFieldName) + strFieldData + Utility.endTag(strFieldName));
        return bFieldsFound;
    }
265498
protected void printBug(BugInstance bugInstance) {
        if (showRank) {
            int rank = BugRanker.findRank(bugInstance);
            outputStream.printf("%2d ", rank);
        }
        switch (bugInstance.getPriority()) {
        case Priorities.EXP_PRIORITY:
            outputStream.print("E ");
            break;
        case Priorities.LOW_PRIORITY:
            outputStream.print("L ");
            break;
        case Priorities.NORMAL_PRIORITY:
            outputStream.print("M ");
            break;
        case Priorities.HIGH_PRIORITY:
            outputStream.print("H ");
            break;
        default:
            assert false;
        }

        BugPattern pattern = bugInstance.getBugPattern();
        if (pattern != null) {
            String categoryAbbrev = null;
            BugCategory bcat = DetectorFactoryCollection.instance().getBugCategory(pattern.getCategory());
            if (bcat != null) {
                categoryAbbrev = bcat.getAbbrev();
            }
            if (categoryAbbrev == null) {
                categoryAbbrev = OTHER_CATEGORY_ABBREV;
            }
            outputStream.print(categoryAbbrev);
            outputStream.print(" ");
        }

        if (useLongBugCodes) {
            outputStream.print(bugInstance.getType());
            outputStream.print(" ");
        }

        if (reportHistory) {
            long first = bugInstance.getFirstVersion();
            long last = bugInstance.getLastVersion();
            outputStream.print(first);
            outputStream.print(" ");
            outputStream.print(last);
            outputStream.print(" ");
        }
        SourceLineAnnotation line = bugInstance.getPrimarySourceLineAnnotation();
        outputStream.println(bugInstance.getMessage().replace('\n', ' ') + "  " + line.toString());
    }
142048
public ReportWriter getReportWriter(final JasperPrint _jasperPrint, final String _format, final Map<JRExporterParameter,Object> _parameters) {
        final JRExporter exporter = FormatInfoRegistry.getInstance().getExporter(_format);
        exporter.setParameters(_parameters);

        if (_jasperPrint.getPages().size() > PAGES_THRESHHOLD) {
            return new FileReportWriter(_jasperPrint, exporter);
        } else {
            return new MemoryReportWriter(_jasperPrint, exporter);
        }
    }
1349132
public void printDataStartForm(PrintWriter out, int iPrintOptions)
    {
        String strRecordName = "norecord";
        Record record = this.getMainRecord();
        if (record != null)
            strRecordName = record.getTableNames(false);
        if ((iPrintOptions & HtmlConstants.MAIN_HEADING_SCREEN) == HtmlConstants.MAIN_HEADING_SCREEN)
        {
            out.println(Utility.startTag(XMLTags.HEADING));
            out.println(Utility.startTag(XMLTags.FILE));
            out.println(Utility.startTag(strRecordName));
        }
        if ((iPrintOptions & HtmlConstants.MAIN_FOOTING_SCREEN) == HtmlConstants.MAIN_FOOTING_SCREEN)
        {
            out.println(Utility.startTag(XMLTags.FOOTING));
            out.println(Utility.startTag(XMLTags.FILE));
            out.println(Utility.startTag(strRecordName));
        }
        if ((iPrintOptions & HtmlConstants.REPORT_SCREEN) != HtmlConstants.REPORT_SCREEN)
            out.println(Utility.startTag(XMLTags.DATA));    // If not a report
    }
117957
protected void doPrint() {

        PrintablePage pageInView = previewPane.getPrintablePage();
        PrintablePage pageToPrint = new PrintablePage();

        try {
            pageInView.bindPage(pageToPrint);

            Printer printer = Printer.getDefaultPrinter();

            if (printer == null || settingsView.getPaperView()
                    .getAvailablePapers().isEmpty()) {
                // Show an Error
                Alert alert = new Alert(AlertType.INFORMATION);
                alert.initOwner(dialog);
                alert.setTitle(Messages
                        .getString("DateControl.TITLE_CALENDAR_PROBLEM"));
                alert.setHeaderText(
                        Messages.getString("PrintView.NO_PRINTERS"));
                alert.setContentText(
                        Messages.getString("PrintView.ERROR_NO_PRINTER"));
                alert.show();
                return;
            }

            hide();
            LoggingDomain.PRINTING.fine("printer = " + printer);

            PageLayout layout = null;

            final Paper paper = pageInView.getPaper();
            final PageOrientation pageOrientation = pageInView.getViewType()
                    .getPageOrientation();
            final PaperView.MarginType marginType = pageInView.getMarginType();

            LoggingDomain.PRINTING.fine("paper = " + paper);
            LoggingDomain.PRINTING.fine("pageOrientation = " + pageOrientation);
            LoggingDomain.PRINTING.fine("marginType = " + marginType);
            LoggingDomain.PRINTING
                    .fine("custom margins = left: " + pageInView.getLeftMargin()
                            + ", right: " + pageInView.getRightMargin()
                            + ", top: " + pageInView.getTopMargin()
                            + ", bottom: " + pageInView.getBottomMargin());

            switch (marginType) {
            case DEFAULT:
                layout = printer.createPageLayout(paper, pageOrientation,
                        Printer.MarginType.DEFAULT);
                break;
            case MINIMUM:
                layout = printer.createPageLayout(paper, pageOrientation,
                        Printer.MarginType.HARDWARE_MINIMUM);
                break;
            case CUSTOM:
                layout = printer.createPageLayout(paper, pageOrientation,
                        pageInView.getLeftMargin(), pageInView.getRightMargin(),
                        pageInView.getTopMargin(),
                        pageInView.getBottomMargin());
                break;
            }

            // sizes of print page and physical page
            double pageWidth = pageToPrint.prefWidth(-1);
            double pageHeight = pageToPrint.prefHeight(-1);

            double printableWidth = layout.getPrintableWidth();
            double printableHeight = layout.getPrintableHeight();

            // scaling
            double scaleX = printableWidth / pageWidth;
            double scaleY = printableHeight / pageHeight;
            double scale = Math.min(scaleX, scaleY);

            LoggingDomain.PRINTING.fine("pageWidth / pageHeight = " + pageWidth
                    + " / " + pageHeight);
            LoggingDomain.PRINTING.fine("printableWidth / printableHeight = "
                    + printableWidth + " / " + printableHeight);
            LoggingDomain.PRINTING
                    .fine("scaleX / scaleY = " + scaleX + " / " + scaleY);
            LoggingDomain.PRINTING.fine("scale = " + scale);

            pageToPrint.applyCss();
            pageToPrint.layout();
            pageToPrint.getTransforms().add(new Scale(scale, scale));

            // transformation = center
            final double translateX = (printableWidth - (pageWidth * scale))
                    / 2;
            final double translateY = (printableHeight - (pageHeight * scale))
                    / 2;

            LoggingDomain.PRINTING.fine("translateX / translateY = "
                    + translateX + " / " + translateY);

            pageToPrint.setTranslateX(translateX);
            pageToPrint.setTranslateY(translateY);

            PrinterJob job = PrinterJob.createPrinterJob(printer);
            JobSettings settings = job.getJobSettings();
            settings.setJobName(Messages.getString("PrintView.TITLE_LABEL"));
            settings.setPageLayout(layout);

            if (job.showPrintDialog(getScene().getWindow())) {
                do {
                    boolean success = job.printPage(pageToPrint);
                    if (!success) {
                        break;
                    }
                } while (pageToPrint.next());

                job.endJob();
            }
        } finally {
            pageInView.unbindPage(pageToPrint);
        }
    }
907466
public void printScreen(PrintWriter out, ResourceBundle reg)
        throws DBException
    {
        if (((DualReportScreen)this.getScreenField()).isPrintReport())
        {   // forms = display - Display the report
            super.printScreen(out, reg);
        }
        else
        {   // forms != display - Display the toolbars
            int iPrintOptions = this.getScreenField().getPrintOptions();
            this.printZmlToolbarControls(out, iPrintOptions);
            this.printZmlToolbarData(out, iPrintOptions);
        }
    }
807688
public void printEndRecordGridData(PrintWriter out, int iPrintOptions)
    {
        out.println("</table>");
        if ((iPrintOptions & HtmlConstants.DETAIL_SCREEN) == HtmlConstants.DETAIL_SCREEN)
        {
            out.println("</td>\n</tr>");
        }
    }
220833
public void printDisplayControl(PrintWriter out)
    {
        if (this.getScreenField().getConverter() != null)
        {
            String strFieldName = this.getScreenField().getConverter().getField().getFieldName(false, false);
            this.printInputControl(out, null, strFieldName, null, null, null, HtmlConstants.BUTTON, 0);   // Button that does nothing?
        }
        else if (this.getScreenField().getParentScreen() instanceof GridScreen)
        { // These are command buttons such as "Form" or "Detail"
            this.printInputControl(out, null, null, null, null, null, HtmlConstants.BUTTON, 0);   // Button that does nothing?
        }
    }
971856
public void printDataStartField(PrintWriter out, int iPrintOptions)
    {
        if ((iPrintOptions & HtmlConstants.MAIN_SCREEN) == HtmlConstants.MAIN_SCREEN)
        {
        }
        else 
            out.println("<tr>");
    }