Printing a JPanel with Scrollable Jtable On it [closed]

I just want to print a JPanel which has a scrollable JTable on it.

I have oriented JPanel with JTable on it. But I can print only visible area.

The contents in scrollable JTable area are not printed.


Solution 1:

There is a reason why I suggest using something like Jasper Reports, this has taken the better part of two days to nut out. JTable doesn't like been treated this way.

Basically, there is the "UI view", which shows the data on the screen and the "print view" which used to generate the print out.

UI View...

UI View

Print view...

Print View

This example, on A4 paper, will generate 22 pages...

import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.Dimension;
import java.awt.EventQueue;
import java.awt.Font;
import java.awt.Graphics;
import java.awt.Graphics2D;
import java.awt.GridBagConstraints;
import java.awt.GridBagLayout;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.image.BufferedImage;
import java.awt.print.PageFormat;
import java.awt.print.Printable;
import java.awt.print.PrinterException;
import java.awt.print.PrinterJob;
import java.io.File;
import java.io.IOException;
import javax.imageio.ImageIO;
import javax.print.attribute.HashPrintRequestAttributeSet;
import javax.print.attribute.PrintRequestAttributeSet;
import javax.print.attribute.standard.DialogTypeSelection;
import javax.print.attribute.standard.Media;
import javax.print.attribute.standard.MediaSizeName;
import javax.print.attribute.standard.PrinterResolution;
import javax.swing.ImageIcon;
import javax.swing.JButton;
import javax.swing.JComponent;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JScrollPane;
import javax.swing.JTable;
import javax.swing.UIManager;
import javax.swing.UnsupportedLookAndFeelException;
import javax.swing.table.DefaultTableModel;
import javax.swing.table.JTableHeader;
import javax.swing.table.TableModel;

public class Test {

    public static void main(String[] args) {
        new Test();
    }

    public Test() {
        EventQueue.invokeLater(new Runnable() {
            @Override
            public void run() {
                try {
                    UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
                } catch (ClassNotFoundException | InstantiationException | IllegalAccessException | UnsupportedLookAndFeelException ex) {
                    ex.printStackTrace();
                }

                JFrame frame = new JFrame("Testing");
                frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
                frame.add(new TestPane());
                frame.pack();
                frame.setLocationRelativeTo(null);
                frame.setVisible(true);
            }
        });
    }

    public class TestPane extends JPanel {

        public TestPane() {
            DefaultTableModel model = new DefaultTableModel();
            int columnCount = 10;
            for (int index = 0; index < columnCount; index++) {
                model.addColumn((char) ('A' + index));
            }
            for (int row = 0; row < 1000; row++) {
                Object[] data = new Object[columnCount];
                for (int col = 0; col < columnCount; col++) {
                    data[col] = row + "x" + col;
                }
                model.addRow(data);
            }

            setLayout(new BorderLayout());
            JTable table = new JTable(model);
            add(new JScrollPane(table));
            JButton print = new JButton("Print");
            add(print, BorderLayout.SOUTH);
            print.addActionListener(new ActionListener() {
                @Override
                public void actionPerformed(ActionEvent e) {
                    try {
                        PrintPane printPane = new PrintPane(model);

                        PrintRequestAttributeSet aset = new HashPrintRequestAttributeSet();
                        aset.add(MediaSizeName.ISO_A4);
                        aset.add(new PrinterResolution(300, 300, PrinterResolution.DPI));
                        aset.add(DialogTypeSelection.NATIVE);

                        PrinterJob pj = PrinterJob.getPrinterJob();
                        pj.setPrintable(printPane);

                        PageFormat pf = pj.defaultPage();
                        pf.setOrientation(PageFormat.LANDSCAPE);

                        if (pj.printDialog(aset)) {
                            try {
                                pj.print(aset);
                            } catch (PrinterException ex) {
                                ex.printStackTrace();
                            }
                        }
                    } catch (IOException ex) {
                        ex.printStackTrace();
                    }

                }
            });
        }

    }

    public class PrintPane extends JPanel implements Printable {

        private JTable table;

        public PrintPane(TableModel model) throws IOException {
            setLayout(new GridBagLayout());
            BufferedImage logo = ImageIO.read(...);
            JLabel header = new JLabel("Honest Bob's Used Ponys", new ImageIcon(logo), JLabel.LEFT);
            header.setFont(header.getFont().deriveFont(Font.BOLD, 24f));
            header.setVerticalAlignment(JLabel.TOP);

            GridBagConstraints gbc = new GridBagConstraints();
            gbc.gridx = 0;
            gbc.gridy = 0;
            gbc.weightx = 1;
            gbc.gridwidth = GridBagConstraints.REMAINDER;
            gbc.fill = GridBagConstraints.HORIZONTAL;

            add(header, gbc);

            table = new JTable(model);
            JTableHeader tableHeader = table.getTableHeader();
            gbc.gridy++;
            add(tableHeader, gbc);

            gbc.gridy++;
            gbc.fill = GridBagConstraints.BOTH;
            add(new JTable(model), gbc);
            setBackground(Color.WHITE);
        }

        private int lastPage = 0;
        private double yOffset;

        @Override
        public int print(Graphics graphics, PageFormat pageFormat, int pageIndex) throws PrinterException {
            int result = NO_SUCH_PAGE;

            String name = "I be mighty!";
            String page = Integer.toString(pageIndex);

            double height = pageFormat.getImageableHeight();
            double width = pageFormat.getImageableWidth();

            System.out.println("Page = " + width + "x" + height);

            JTableHeader tableHeader = table.getTableHeader();
            Dimension size = tableHeader.getPreferredSize();
            tableHeader.setPreferredSize(new Dimension((int) width, size.height));
            tableHeader.setSize(table.getPreferredSize());

            size = table.getPreferredSize();
            table.setPreferredSize(new Dimension((int) width, size.height));
            table.setSize(table.getPreferredSize());

            size = getPreferredSize();
            setSize((int)width, size.height);
            invalidate();
            doLayout();

            table.doLayout();
            tableHeader.doLayout();

            if (lastPage != pageIndex) {
                lastPage = pageIndex;
                yOffset = height * pageIndex;
                if (yOffset > getHeight()) {
                    yOffset = -1;
                }
            }

            if (yOffset >= 0) {
                Graphics2D g2d = (Graphics2D) graphics.create();

                g2d.translate((int) pageFormat.getImageableX(),
                        (int) pageFormat.getImageableY());

                g2d.translate(0, -yOffset);
                printAll(g2d);

                g2d.dispose();

                result = PAGE_EXISTS;
                System.out.println("Print page " + pageIndex);
            }
            return result;
        }

    }
}

There is one significant problem, the fact that a row might be split over two pages. This would require you to be able to calculate the number of rows which would fit onto the page and clip the Graphics accordingly, but I'll leave that to you to figure out

Solution 2:

nb: This answer basically extends from the previous, but wouldn't have fitted into the other answer

Example using Jasper Reports

JasperReports is an investment of time. While the learning curve can be steep, once you start getting your head into it, it's very, very flexible. We use to have to write no less then 3 exports for each report our project had to export (including the UI), now, we write one and it exports to PDF, printer, excel (and word, html). When you want to change the report (ie, add page numbering), it's one place that gets changed and the code basically remains the same

  • Generated with JasperReports Library 6.2.0
  • Using JasperSoft Studio 6.2.0

You'll also need

  • Apache Commons Logging (I was using 1.1.2)
  • Apache Commons Collections (I was using 3.2.1)
  • Apache Commons Digester (I was using 2/2.1)
  • Apache Commons BeanUtils (I was using (1.9.2)
  • JodaTime (I was using 2.7)

Jasper Reports

import java.awt.BorderLayout;
import java.awt.EventQueue;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.image.BufferedImage;
import java.beans.PropertyChangeEvent;
import java.beans.PropertyChangeListener;
import java.io.InputStream;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.concurrent.ExecutionException;
import java.util.concurrent.locks.Condition;
import java.util.concurrent.locks.ReentrantLock;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.imageio.ImageIO;
import javax.print.attribute.HashPrintRequestAttributeSet;
import javax.print.attribute.PrintRequestAttributeSet;
import javax.print.attribute.standard.MediaSizeName;
import javax.print.attribute.standard.PrinterResolution;
import javax.swing.JButton;
import javax.swing.JDialog;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JOptionPane;
import javax.swing.JPanel;
import javax.swing.JScrollPane;
import javax.swing.JTable;
import javax.swing.SwingUtilities;
import javax.swing.SwingWorker;
import javax.swing.UIManager;
import javax.swing.UnsupportedLookAndFeelException;
import javax.swing.border.EmptyBorder;
import javax.swing.table.DefaultTableModel;
import net.sf.jasperreports.engine.JRException;
import net.sf.jasperreports.engine.JasperPrint;
import net.sf.jasperreports.engine.JasperReport;
import net.sf.jasperreports.engine.data.JRBeanCollectionDataSource;
import net.sf.jasperreports.engine.export.JRPrintServiceExporter;
import net.sf.jasperreports.engine.fill.AsynchronousFillHandle;
import net.sf.jasperreports.engine.fill.AsynchronousFilllListener;
import net.sf.jasperreports.engine.fill.FillListener;
import net.sf.jasperreports.engine.util.JRLoader;
import net.sf.jasperreports.export.SimpleExporterInput;
import net.sf.jasperreports.export.SimplePrintServiceExporterConfiguration;

public class Test {

    public static void main(String[] args) {
        new Test();
    }

    public Test() {
        EventQueue.invokeLater(new Runnable() {
            @Override
            public void run() {
                try {
                    UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
                } catch (ClassNotFoundException | InstantiationException | IllegalAccessException | UnsupportedLookAndFeelException ex) {
                    ex.printStackTrace();
                }

                JFrame frame = new JFrame("Testing");
                frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
                frame.add(new TestPane());
                frame.pack();
                frame.setLocationRelativeTo(null);
                frame.setVisible(true);
            }
        });
    }

    public class TestPane extends JPanel {

        public TestPane() {
            DefaultTableModel model = new DefaultTableModel();
            int columnCount = 10;
            for (int index = 0; index < columnCount; index++) {
                model.addColumn((char) ('A' + index));
            }
            for (int row = 0; row < 1000; row++) {
                Object[] data = new Object[columnCount];
                for (int col = 0; col < columnCount; col++) {
                    data[col] = row + "x" + col;
                }
                model.addRow(data);
            }

            setLayout(new BorderLayout());
            JTable table = new JTable(model);
            add(new JScrollPane(table));
            JButton print = new JButton("Print");
            add(print, BorderLayout.SOUTH);
            print.addActionListener(new ActionListener() {
                @Override
                public void actionPerformed(ActionEvent e) {
                    List<ReportData> data = new ArrayList<>(model.getRowCount());
                    for (int row = 0; row < model.getRowCount(); row++) {
                        ReportData reportData = new ReportData();
                        for (int col = 0; col < model.getColumnCount(); col++) {
                            reportData.add((String) model.getValueAt(row, col));
                        }
                        data.add(reportData);
                    }

                    JDialog dialog = new JDialog(SwingUtilities.windowForComponent(TestPane.this), "Generating Report");
                    dialog.setModal(true);
                    dialog.setDefaultCloseOperation(JDialog.DO_NOTHING_ON_CLOSE);
                    JPanel panel = new JPanel(new BorderLayout());
                    panel.setBorder(new EmptyBorder(20, 20, 20, 20));
                    dialog.setContentPane(panel);
                    dialog.add(new JLabel("Please wait..."));
                    dialog.pack();

                    PrintWorker printWorker = new PrintWorker(data);
                    printWorker.addPropertyChangeListener(new PropertyChangeListener() {
                        @Override
                        public void propertyChange(PropertyChangeEvent evt) {
                            PrintWorker worker = (PrintWorker) evt.getSource();
                            String name = evt.getPropertyName();
                            if ("state".equalsIgnoreCase(name)) {
                                if (worker.isDone()) {
                                    dialog.setVisible(false);

                                    try {
                                        worker.get();
                                    } catch (InterruptedException | ExecutionException ex) {
                                        ex.printStackTrace();
                                    }
                                }
                            } else if ("status".equalsIgnoreCase(name)) {
                                ReportStatus status = worker.getStatus();
                                switch (status) {
                                    case FAILED:
                                        dialog.setVisible(false);
                                        JOptionPane.showMessageDialog(TestPane.this, "Report Generation Failed", "Error", JOptionPane.ERROR_MESSAGE);
                                        break;
                                    case CANCELLED:
                                        dialog.setVisible(false);
                                        JOptionPane.showMessageDialog(TestPane.this, "Report Generation was Cancelled", "Warning", JOptionPane.WARNING_MESSAGE);
                                        break;
                                    case COMPLETED:
                                        dialog.setVisible(false);
                                        System.out.println("Yippe :)");
                                        JasperPrint jp = worker.getJasperPrint();
                                        PrintRequestAttributeSet aset = new HashPrintRequestAttributeSet();
                                        aset.add(new PrinterResolution(300, 300, PrinterResolution.DPI));
                                        aset.add(MediaSizeName.ISO_A4);

                                        JRPrintServiceExporter printer = new JRPrintServiceExporter();
                                        printer.setExporterInput(new SimpleExporterInput(jp));

                                        SimplePrintServiceExporterConfiguration configuration = new SimplePrintServiceExporterConfiguration();
                                        configuration.setPrintRequestAttributeSet(aset);
                                        configuration.setDisplayPageDialog(false);
                                        configuration.setDisplayPrintDialog(true);
                                        printer.setConfiguration(configuration);

                                        try {
                                            printer.exportReport();
                                        } catch (JRException ex) {
                                            ex.printStackTrace();
                                        }
                                        break;
                                }
                            }
                        }
                    });
                    printWorker.execute();

                    dialog.setLocationRelativeTo(TestPane.this);
                    dialog.setVisible(true);
                }
            });
        }

    }

    public class ReportData {
        private List<String> data = new ArrayList<>(25);

        public List<String> getData() {
            return data;
        }

        public void add(String value) {
            data.add(value);
        }

    }

    public enum ReportStatus {
        FAILED, COMPLETED, CANCELLED;
    }

    public static class PrintWorker extends SwingWorker<ReportStatus, Void> {

        private List<ReportData> data;
        private ReportStatus status = ReportStatus.FAILED;
        private JasperPrint jasperPrint;

        private ReentrantLock waitLock = new ReentrantLock();
        private Condition waitCon = waitLock.newCondition();

        public PrintWorker(List<ReportData> data) {
            this.data = data;
        }

        public ReportStatus getStatus() {
            return status;
        }

        public JasperPrint getJasperPrint() {
            return jasperPrint;
        }

        @Override
        protected ReportStatus doInBackground() throws Exception {
            try (InputStream is = getClass().getResourceAsStream("/test/reports/SalesReport.jasper")) {

                JasperReport report = (JasperReport) JRLoader.loadObject(is);

                Map<String, Object> mapParameters = new HashMap<>(5);
                BufferedImage img = ImageIO.read(getClass().getResource("/test/images/Logo.png"));
                mapParameters.put("LOGO", img);

                AsynchronousFillHandle handler = AsynchronousFillHandle.createHandle(report, mapParameters, new JRBeanCollectionDataSource(data));
                handler.addFillListener(new FillListener() {

                    @Override
                    public void pageGenerated(JasperPrint jp, int i) {
                        System.out.println("Page Generated " + i);
                    }

                    @Override
                    public void pageUpdated(JasperPrint jp, int i) {
                        System.out.println("Page Update " + i);
                    }

                });
                handler.addListener(new AsynchronousFilllListener() {

                    @Override
                    public void reportFinished(final JasperPrint jp) {
                        System.out.println("Finished...");
                        status = ReportStatus.COMPLETED;
                        jasperPrint = jp;
                        firePropertyChange("status", null, status);
                        waitLock.lock();
                        try {
                            waitCon.signalAll();
                        } finally {
                            waitLock.unlock();
                        }
                    }

                    @Override
                    public void reportCancelled() {
                        System.out.println("Cancelled...");
                        status = ReportStatus.CANCELLED;
                        firePropertyChange("status", null, status);
                        waitLock.lock();
                        try {
                            waitCon.signalAll();
                        } finally {
                            waitLock.unlock();
                        }
                    }

                    @Override
                    public void reportFillError(Throwable thrwbl) {
                        System.out.println("Failed...");
                        status = ReportStatus.FAILED;
                        firePropertyChange("status", null, status);

                        thrwbl.printStackTrace();

                        waitLock.lock();
                        try {
                            waitCon.signalAll();
                        } finally {
                            waitLock.unlock();
                        }
                    }
                });
                handler.startFill();

            }

            waitLock.lock();
            try {
                waitCon.await();
            } finally {
                waitLock.unlock();
            }

            System.out.println("All done here");
            return status;
        }

    }
}

JasperReport jxml

Now, in the 3-4 years I've been using JasperReports, I've never written the jxml manually, I've always used the form editor, but, just so you can paste this in...

<?xml version="1.0" encoding="UTF-8"?>
<!-- Created with Jaspersoft Studio version 6.1.1.final using JasperReports Library version 6.1.1  -->
<!-- 2015-12-08T11:39:14 -->
<jasperReport xmlns="http://jasperreports.sourceforge.net/jasperreports" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://jasperreports.sourceforge.net/jasperreports http://jasperreports.sourceforge.net/xsd/jasperreport.xsd" name="SalesReport" pageWidth="595" pageHeight="842" columnWidth="555" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20" uuid="3d6825b2-df5d-47ee-a901-26f4c5fa3429">
    <parameter name="LOGO" class="java.awt.Image" isForPrompting="false"/>
    <queryString>
        <![CDATA[]]>
    </queryString>
    <field name="data" class="java.util.List"/>
    <background>
        <band splitType="Stretch"/>
    </background>
    <title>
        <band height="107" splitType="Stretch">
            <image hAlign="Center" vAlign="Middle">
                <reportElement key="" x="0" y="0" width="100" height="100" uuid="3d8b698a-aaa1-45d4-b979-2c2f70ab3858">
                    <property name="local_mesure_unitwidth" value="cm"/>
                    <property name="local_mesure_unitheight" value="cm"/>
                </reportElement>
                <imageExpression><![CDATA[$P{LOGO}]]></imageExpression>
            </image>
            <staticText>
                <reportElement x="105" y="0" width="450" height="100" uuid="eb5d50a7-5931-4473-b2e5-56766c4263d6"/>
                <textElement textAlignment="Left" verticalAlignment="Middle">
                    <font fontName="Calibri" size="36" isBold="true"/>
                </textElement>
                <text><![CDATA[Honest Bob's Used Ponies]]></text>
            </staticText>
        </band>
    </title>
    <columnHeader>
        <band height="36" splitType="Stretch">
            <property name="com.jaspersoft.studio.layout" value="com.jaspersoft.studio.editor.layout.HorizontalRowLayout"/>
            <staticText>
                <reportElement x="0" y="0" width="60" height="36" uuid="e30efc2e-843d-4c1e-b28a-760ac3166e75">
                    <property name="com.jaspersoft.studio.unit.width" value="pixel"/>
                </reportElement>
                <box>
                    <topPen lineWidth="1.0"/>
                    <leftPen lineWidth="1.0"/>
                    <bottomPen lineWidth="1.0"/>
                </box>
                <textElement textAlignment="Center" verticalAlignment="Middle">
                    <font fontName="Calibri" size="12"/>
                </textElement>
                <text><![CDATA[A]]></text>
            </staticText>
            <staticText>
                <reportElement x="60" y="0" width="55" height="36" uuid="761a067d-03b3-4e91-92af-08e1ea4d03dd">
                    <property name="com.jaspersoft.studio.unit.width" value="pixel"/>
                </reportElement>
                <box>
                    <topPen lineWidth="1.0"/>
                    <leftPen lineWidth="1.0"/>
                    <bottomPen lineWidth="1.0"/>
                </box>
                <textElement textAlignment="Center" verticalAlignment="Middle">
                    <font fontName="Calibri" size="12"/>
                </textElement>
                <text><![CDATA[B]]></text>
            </staticText>
            <staticText>
                <reportElement x="115" y="0" width="55" height="36" uuid="1b753893-a380-4a77-8938-3dcea6486383">
                    <property name="com.jaspersoft.studio.unit.width" value="pixel"/>
                </reportElement>
                <box>
                    <topPen lineWidth="1.0"/>
                    <leftPen lineWidth="1.0"/>
                    <bottomPen lineWidth="1.0"/>
                </box>
                <textElement textAlignment="Center" verticalAlignment="Middle">
                    <font fontName="Calibri" size="12"/>
                </textElement>
                <text><![CDATA[C]]></text>
            </staticText>
            <staticText>
                <reportElement x="170" y="0" width="55" height="36" uuid="c46b1125-8c9c-4768-9267-75c87bf2c7c3">
                    <property name="com.jaspersoft.studio.unit.width" value="pixel"/>
                </reportElement>
                <box>
                    <topPen lineWidth="1.0"/>
                    <leftPen lineWidth="1.0"/>
                    <bottomPen lineWidth="1.0"/>
                </box>
                <textElement textAlignment="Center" verticalAlignment="Middle">
                    <font fontName="Calibri" size="12"/>
                </textElement>
                <text><![CDATA[D]]></text>
            </staticText>
            <staticText>
                <reportElement x="225" y="0" width="55" height="36" uuid="dfe91e74-f722-43cf-9a34-a4cd0ca202a1">
                    <property name="com.jaspersoft.studio.unit.width" value="pixel"/>
                </reportElement>
                <box>
                    <topPen lineWidth="1.0"/>
                    <leftPen lineWidth="1.0"/>
                    <bottomPen lineWidth="1.0"/>
                </box>
                <textElement textAlignment="Center" verticalAlignment="Middle">
                    <font fontName="Calibri" size="12"/>
                </textElement>
                <text><![CDATA[E]]></text>
            </staticText>
            <staticText>
                <reportElement x="280" y="0" width="55" height="36" uuid="e5504504-c5a5-4c36-a3a0-3702cc52609c">
                    <property name="com.jaspersoft.studio.unit.width" value="pixel"/>
                </reportElement>
                <box>
                    <topPen lineWidth="1.0"/>
                    <leftPen lineWidth="1.0"/>
                    <bottomPen lineWidth="1.0"/>
                </box>
                <textElement textAlignment="Center" verticalAlignment="Middle">
                    <font fontName="Calibri" size="12"/>
                </textElement>
                <text><![CDATA[F]]></text>
            </staticText>
            <staticText>
                <reportElement x="335" y="0" width="55" height="36" uuid="c9e49d80-fc80-4f64-ae43-9ac4da4a3fda">
                    <property name="com.jaspersoft.studio.unit.width" value="pixel"/>
                </reportElement>
                <box>
                    <topPen lineWidth="1.0"/>
                    <leftPen lineWidth="1.0"/>
                    <bottomPen lineWidth="1.0"/>
                </box>
                <textElement textAlignment="Center" verticalAlignment="Middle">
                    <font fontName="Calibri" size="12"/>
                </textElement>
                <text><![CDATA[G]]></text>
            </staticText>
            <staticText>
                <reportElement x="390" y="0" width="55" height="36" uuid="9ad6dcae-605d-47e8-bdee-e230dea5970c">
                    <property name="com.jaspersoft.studio.unit.width" value="pixel"/>
                </reportElement>
                <box>
                    <topPen lineWidth="1.0"/>
                    <leftPen lineWidth="1.0"/>
                    <bottomPen lineWidth="1.0"/>
                </box>
                <textElement textAlignment="Center" verticalAlignment="Middle">
                    <font fontName="Calibri" size="12"/>
                </textElement>
                <text><![CDATA[H]]></text>
            </staticText>
            <staticText>
                <reportElement x="445" y="0" width="55" height="36" uuid="9ed989a1-d8fa-45d4-812b-42ed4de292b0">
                    <property name="com.jaspersoft.studio.unit.width" value="pixel"/>
                </reportElement>
                <box>
                    <topPen lineWidth="1.0"/>
                    <leftPen lineWidth="1.0"/>
                    <bottomPen lineWidth="1.0"/>
                </box>
                <textElement textAlignment="Center" verticalAlignment="Middle">
                    <font fontName="Calibri" size="12"/>
                </textElement>
                <text><![CDATA[I]]></text>
            </staticText>
            <staticText>
                <reportElement x="500" y="0" width="55" height="36" uuid="ba50fbea-9323-4c5d-814c-356d1752ecd6">
                    <property name="com.jaspersoft.studio.unit.width" value="pixel"/>
                </reportElement>
                <box>
                    <topPen lineWidth="1.0"/>
                    <leftPen lineWidth="1.0"/>
                    <bottomPen lineWidth="1.0"/>
                    <rightPen lineWidth="1.0"/>
                </box>
                <textElement textAlignment="Center" verticalAlignment="Middle">
                    <font fontName="Calibri" size="12"/>
                </textElement>
                <text><![CDATA[J]]></text>
            </staticText>
        </band>
    </columnHeader>
    <detail>
        <band height="16" splitType="Stretch">
            <property name="com.jaspersoft.studio.layout" value="com.jaspersoft.studio.editor.layout.FreeLayout"/>
            <textField>
                <reportElement x="0" y="0" width="60" height="16" uuid="d3d12d31-bce2-4850-8c68-4ca336869302"/>
                <box>
                    <leftPen lineWidth="1.0"/>
                    <bottomPen lineWidth="1.0"/>
                </box>
                <textElement>
                    <font fontName="Arial"/>
                </textElement>
                <textFieldExpression><![CDATA[$F{data}.get(0)]]></textFieldExpression>
            </textField>
            <textField>
                <reportElement x="60" y="0" width="55" height="16" uuid="c30464ca-c723-4378-abf0-0c1e9d282a14"/>
                <box>
                    <leftPen lineWidth="1.0"/>
                    <bottomPen lineWidth="1.0"/>
                </box>
                <textElement>
                    <font fontName="Arial"/>
                </textElement>
                <textFieldExpression><![CDATA[$F{data}.get(1)]]></textFieldExpression>
            </textField>
            <textField>
                <reportElement x="115" y="0" width="55" height="16" uuid="7451163c-37da-48fa-aa42-b62e7e81bb3c"/>
                <box>
                    <leftPen lineWidth="1.0"/>
                    <bottomPen lineWidth="1.0"/>
                </box>
                <textElement>
                    <font fontName="Arial"/>
                </textElement>
                <textFieldExpression><![CDATA[$F{data}.get(2)]]></textFieldExpression>
            </textField>
            <textField pattern="">
                <reportElement x="170" y="0" width="55" height="16" uuid="4038f5d0-bfc5-475c-91cd-103e0dee7cf9"/>
                <box>
                    <leftPen lineWidth="1.0"/>
                    <bottomPen lineWidth="1.0"/>
                </box>
                <textElement>
                    <font fontName="Arial"/>
                </textElement>
                <textFieldExpression><![CDATA[$F{data}.get(3)]]></textFieldExpression>
            </textField>
            <textField>
                <reportElement x="225" y="0" width="55" height="16" uuid="f7369acd-ad91-4170-ac4f-b46a888666e1"/>
                <box>
                    <leftPen lineWidth="1.0"/>
                    <bottomPen lineWidth="1.0"/>
                </box>
                <textElement>
                    <font fontName="Arial"/>
                </textElement>
                <textFieldExpression><![CDATA[$F{data}.get(4)]]></textFieldExpression>
            </textField>
            <textField>
                <reportElement x="280" y="0" width="55" height="16" uuid="942c7d77-39c0-4632-8c73-c18d6a27ed66"/>
                <box>
                    <leftPen lineWidth="1.0"/>
                    <bottomPen lineWidth="1.0"/>
                </box>
                <textElement>
                    <font fontName="Arial"/>
                </textElement>
                <textFieldExpression><![CDATA[$F{data}.get(5)]]></textFieldExpression>
            </textField>
            <textField>
                <reportElement x="335" y="0" width="55" height="16" uuid="dcea008b-b4c4-480c-8853-ef60eca945c6"/>
                <box>
                    <leftPen lineWidth="1.0"/>
                    <bottomPen lineWidth="1.0"/>
                </box>
                <textElement>
                    <font fontName="Arial"/>
                </textElement>
                <textFieldExpression><![CDATA[$F{data}.get(6)]]></textFieldExpression>
            </textField>
            <textField>
                <reportElement x="390" y="0" width="55" height="16" uuid="17e05f28-ae3c-4ecf-baff-77ff2d2aab66"/>
                <box>
                    <leftPen lineWidth="1.0"/>
                    <bottomPen lineWidth="1.0"/>
                </box>
                <textElement>
                    <font fontName="Arial"/>
                </textElement>
                <textFieldExpression><![CDATA[$F{data}.get(7)]]></textFieldExpression>
            </textField>
            <textField>
                <reportElement x="445" y="0" width="55" height="16" uuid="4dad91f1-0451-403b-a02c-6eb26d58ea97"/>
                <box>
                    <leftPen lineWidth="1.0"/>
                    <bottomPen lineWidth="1.0"/>
                </box>
                <textElement>
                    <font fontName="Arial"/>
                </textElement>
                <textFieldExpression><![CDATA[$F{data}.get(8)]]></textFieldExpression>
            </textField>
            <textField>
                <reportElement x="500" y="0" width="55" height="16" uuid="0b584a93-a736-4fa3-b7b9-dcb909638aad"/>
                <box>
                    <leftPen lineWidth="1.0"/>
                    <bottomPen lineWidth="1.0"/>
                    <rightPen lineWidth="1.0"/>
                </box>
                <textElement>
                    <font fontName="Arial"/>
                </textElement>
                <textFieldExpression><![CDATA[$F{data}.get(9)]]></textFieldExpression>
            </textField>
            <rectangle>
                <reportElement mode="Opaque" x="0" y="0" width="555" height="16" backcolor="rgba(0, 84, 73, 0.1254902)" uuid="8ba2fd94-84a3-4b28-86c2-7c4306b64774">
                    <printWhenExpression><![CDATA[new Boolean( $V{PAGE_COUNT}.intValue() % 2 != 0)]]></printWhenExpression>
                </reportElement>
                <graphicElement>
                    <pen lineWidth="0.0" lineColor="#000000"/>
                </graphicElement>
            </rectangle>
        </band>
    </detail>
    <pageFooter>
        <band height="16">
            <property name="com.jaspersoft.studio.unit.height" value="pixel"/>
            <textField>
                <reportElement x="235" y="0" width="275" height="16" uuid="db59b963-ace0-4103-a6e2-81ec2d02c6bb"/>
                <textElement textAlignment="Right">
                    <font fontName="Arial"/>
                </textElement>
                <textFieldExpression><![CDATA["Page " + $V{PAGE_NUMBER}]]></textFieldExpression>
            </textField>
            <textField evaluationTime="Report">
                <reportElement x="510" y="0" width="45" height="16" uuid="13f222e8-e2fd-437e-a9ca-95c1d0c8736f"/>
                <textElement textAlignment="Left">
                    <font fontName="Arial"/>
                </textElement>
                <textFieldExpression><![CDATA[" of " + $V{PAGE_NUMBER}]]></textFieldExpression>
            </textField>
        </band>
    </pageFooter>
</jasperReport>