.. oe:namespace:: OEDepict


.. meta::
   :keywords: OEReport


.. _OEDepict_OEReport:

.. oe:class:: OEReport

   .. oe:api::

      class OEReport

   This class represents a layout manager that allows generation of
   multi-page images with two types of page layouts:

   **body**
      The *body* page layout provides a convenient way to position information
      in the middle of the page relative to the page footers and headers.
      For example, see the :math:`1^{st}` page in
      :ref:`Figure: Schematic representation of documents that can be created using the OEReport class<figure_OEReport>`.

   **grid**
      The *grid* page layout provides a convenient way to organize information
      (such as text and molecule depiction) into rows and columns.
      For example, see the :math:`2^{nd}` and  :math:`3^{rd}` pages in
      :ref:`Figure: Schematic representation of documents that can be created using the OEReport class<figure_OEReport>`.


   .. _figure_OEReport:

   .. figure:: ../images/OEReportLayout.*
      :align:  center

      **Schematic representation of documents that can be created using the OEReport class**

   .. seealso::

      * :ref:`section_multipage_report` section
      * :ref:`section_examples_summary_mols2pdf` example
      * :ref:`section_examples_summary_viewmdlsearch` example
      * :ref:`OEReportOptions <OEDepict_OEReportOptions>` class
      * :oe:func:`OEDepict::OEWriteReport` function
      * :oe:func:`OEDepict::OEWriteReportToString` function


   .. ################################################################
      # Constructors
      ################################################################

   .. oe:method:: Constructors

      .. oe:language:: c++ java csharp

         .. oe:api::

            OEReport(const OEReportOptions& opts)

      .. oe:language:: python

         .. oe:api:: python

            OEReport(opts: OEReportOptions) -> OEReport

      Initializes an :ref:`OEReport <OEDepict_OEReport>` object using
      the given options.

      *opts*
         The :ref:`OEReportOptions <OEDepict_OEReportOptions>` object that stores
         parameters determining the layout of the *body* and the
         *grid* pages of the report.

      .. oe:language:: c++ java csharp

         .. oe:api::

            OEReport(unsigned int rowsperpage, unsigned int colsperpage)

      .. oe:language:: python

         .. oe:api:: python

            OEReport(rowsperpage: int, colsperpage: int) -> OEReport

      Initializes an :ref:`OEReport <OEDepict_OEReport>` object with the
      given parameters.

      *rowsperpage*
         The number of rows on each *grid* layout page.

      *colsperpage*
         The number of columns on each *grid* layout page.

      .. note::

        When a report is initialized with only the number of rows and
        columns per page parameter, all other parameters defining
        the layout of the pages will be initialized from the default
        constructor of the :ref:`OEReportOptions <OEDepict_OEReportOptions>` class.

      .. seealso::

         * :ref:`OEReportOptions <OEDepict_OEReportOptions>` class

   .. ################################################################
      #
      ################################################################

   .. oe:method:: GetBodies

      .. oe:language:: c++ java csharp

         .. oe:api::

            OESystem::OEIterBase<OEImageBase>* GetBodies()

      .. oe:language:: python

         .. oe:api:: python

            GetBodies() -> Iterable[OEImageBase]

      Returns an iterator over all page bodies that have been created by
      calling the :oe:meth:`OEDepict::OEReport::NewBody` method.

      .. note::

         If no page has been created by the :oe:meth:`OEDepict::OEReport::NewBody`
         method, then the :oe:meth:`OEDepict::OEReport::GetBodies` method returns
         an empty iterator.

      See example in :ref:`Figure: Example of accessing all page bodies of the report<figure_OEReport_GetBodies>`,
      where *body* areas in the :math:`1^{st}` and :math:`5^{th}` page are returned.

      .. oe:source:: OEReportIter.py
         :language: python
         :noindent:
         :frag:     SNIPPET-OEREPORT-GETBODIES

      .. oe:source:: OEReportIter.cpp
         :language: c++
         :noindent:
         :frag:     SNIPPET-OEREPORT-GETBODIES

      .. oe:source:: OEReportIter.java
         :language: java
         :noindent:
         :frag:     SNIPPET-OEREPORT-GETBODIES

      .. oe:source:: OEReportIter.cs
         :language: csharp
         :noindent:
         :frag:     SNIPPET-OEREPORT-GETBODIES


      .. _figure_OEReport_GetBodies:

      .. list-table:: **Example of accessing all page bodies of the report**. (The numbers inside the cells represent the order in which they are returned)
         :widths: 150 150 150 150 150
         :header-rows: 1

         * - page 1
           - page 2
           - page 3
           - page 4
           - page 5

         * - .. image:: ../images/OEReportIter-bodies-1.*
           - .. image:: ../images/OEReportIter-bodies-2.*
           - .. image:: ../images/OEReportIter-bodies-3.*
           - .. image:: ../images/OEReportIter-bodies-4.*
           - .. image:: ../images/OEReportIter-bodies-5.*

      .. seealso::

         * :oe:meth:`OEDepict::OEReport::GetBody` method
         * :oe:meth:`OEDepict::OEReport::NewBody` method


   .. ################################################################
      #
      ################################################################

   .. oe:method:: GetBody

      .. oe:language:: c++ java csharp

         .. oe:api::

            OEImageBase* GetBody(unsigned int p)

      .. oe:language:: python

         .. oe:api:: python

            GetBody(page: int) -> OEImageBase

      Returns the :ref:`OEImageBase <OEDepict_OEImageBase>` pointer of the body
      area of the :math:`p^{th}` page.

      *p*
         This value has to be in the range from `1` to
         :oe:meth:`OEDepict::OEReport::NumPages()<OEDepict::OEReport::NumPages>`.


      .. note::

         If the :math:`p^{th}` page of the report was not created by
         the :oe:meth:`OEDepict::OEReport::NewBody` method or the :math:`p`
         page index is out of range, then the :oe:meth:`OEDepict::OEReport::GetBody`
         method returns a NULL pointer.

      .. seealso::

         * :oe:meth:`OEDepict::OEReport::GetBodies` method
         * :oe:meth:`OEDepict::OEReport::NewBody` method


   .. ################################################################
      #
      ################################################################

   .. oe:method:: GetCell

      .. oe:language:: c++ java csharp

         .. oe:api::

            OEImageBase* GetCell(unsigned int p, unsigned int r, unsigned int c)

      .. oe:language:: python

         .. oe:api:: python

            GetCell(page: int, row: int, col: int) -> OEImageBase

      Returns the :ref:`OEImageBase <OEDepict_OEImageBase>` pointer for the cell
      positioned in the :math:`r^{th}` row and :math:`c^{th}` columns on
      the :math:`p^{th}` page.

      *p*
         This value has to be in the range from `1` to
         :oe:meth:`OEDepict::OEReport::NumPages()<OEDepict::OEReport::NumPages>`.

      *r*
         This value has to be in the range from `1` to
         :oe:meth:`OEDepict::OEReport::NumRowsPerPage()<OEDepict::OEReport::NumRowsPerPage>`.

      *c*
         This value has to be in the range from `1` to
         :oe:meth:`OEDepict::OEReport::NumColsPerPage()<OEDepict::OEReport::NumColsPerPage>`.

      .. note::

         If the cell positioned in the :math:`r^{th}` row and
         :math:`c^{th}` columns on the :math:`p^{th}` page has not been
         created by the :oe:meth:`OEDepict::OEReport::NewCell` method,
         then the :oe:meth:`OEDepict::OEReport::GetCell` method returns
         a NULL  pointer.

      .. seealso::

         * :oe:meth:`OEDepict::OEReport::GetCells` method
         * :oe:meth:`OEDepict::OEReport::NewCell` method


   .. ################################################################
      #
      ################################################################

   .. oe:method:: GetCellHeight

      .. oe:language:: c++ java csharp

         .. oe:api::

            double GetCellHeight() const

      .. oe:language:: python

         .. oe:api:: python

            GetCellHeight() -> float

      Returns the height of the cells on the grid page of the
      :ref:`OEReport <OEDepict_OEReport>` object.


   .. ################################################################
      #
      ################################################################

   .. oe:method:: GetCellWidth

      .. oe:language:: c++ java csharp

         .. oe:api::

            double GetCellWidth() const

      .. oe:language:: python

         .. oe:api:: python

            GetCellWidth() -> float

      Returns the width of the cells on the grid page of the
      :ref:`OEReport <OEDepict_OEReport>` object.


   .. ################################################################
      #
      ################################################################

   .. oe:method:: GetCells

      .. oe:language:: c++ java csharp

         .. oe:api::

            OESystem::OEIterBase<OEImageBase>* GetCells(unsigned int page = 0u,
                                                        unsigned int row = 0u,
                                                        unsigned int col = 0u)

      .. oe:language:: python

         .. oe:api:: python

            GetCells(page: int = 0, row: int = 0, col: int = 0) -> Iterable[OEImageBase]

      Returns an iterator over cells that have been created by calling the
      :oe:meth:`OEDepict::OEReport::NewCell` method.
      The cells are returned in the order in which they have been created
      *i.e.* from left to right and top to bottom order on each grid page.

      *page*
         This value has to be in the range from `0` to
         :oe:meth:`OEDepict::OEReport::NumPages()<OEDepict::OEReport::NumPages>`.

      *row*
         This value has to be in the range from `0` to
         :oe:meth:`OEDepict::OEReport::NumRowsPerPage()<OEDepict::OEReport::NumRowsPerPage>`.

      *col*
         This value has to be in the range from `0` to
         :oe:meth:`OEDepict::OEReport::NumColsPerPage()<OEDepict::OEReport::NumColsPerPage>`.

      Example (:ref:`Figure: Example of accessing all cells of the report<figure_OEReport_GetCells_All>`)

      .. oe:source:: OEReportIter.py
         :language: python
         :noindent:
         :frag:     SNIPPET-OEREPORT-GETCELLS-ALL

      .. oe:source:: OEReportIter.cpp
         :language: c++
         :noindent:
         :frag:     SNIPPET-OEREPORT-GETCELLS-ALL

      .. oe:source:: OEReportIter.java
         :language: java
         :noindent:
         :frag:     SNIPPET-OEREPORT-GETCELLS-ALL

      .. oe:source:: OEReportIter.cs
         :language: csharp
         :noindent:
         :frag:     SNIPPET-OEREPORT-GETCELLS-ALL


      .. _figure_OEReport_GetCells_All:

      .. list-table:: **Example of accessing all cells of the report**. (The numbers inside the cells represent the order in which they are returned)
         :widths: 150 150 150 150 150
         :header-rows: 1

         * - page 1
           - page 2
           - page 3
           - page 4
           - page 5

         * - .. image:: ../images/OEReportIter-cells-all-1.*
           - .. image:: ../images/OEReportIter-cells-all-2.*
           - .. image:: ../images/OEReportIter-cells-all-3.*
           - .. image:: ../images/OEReportIter-cells-all-4.*
           - .. image:: ../images/OEReportIter-cells-all-5.*

      Example (:ref:`Figure: Example of accessing all cells on the given row on each page<figure_OEReport_GetCells_AllPages_Row_AllCols>`)

      .. oe:source:: OEReportIter.py
         :language: python
         :noindent:
         :frag:     SNIPPET-OEREPORT-GETCELLS-ALLPAGES-ROW-ALLCOLS

      .. oe:source:: OEReportIter.cpp
         :language: c++
         :noindent:
         :frag:     SNIPPET-OEREPORT-GETCELLS-ALLPAGES-ROW-ALLCOLS

      .. oe:source:: OEReportIter.java
         :language: java
         :noindent:
         :frag:     SNIPPET-OEREPORT-GETCELLS-ALLPAGES-ROW-ALLCOLS

      .. oe:source:: OEReportIter.cs
         :language: csharp
         :noindent:
         :frag:     SNIPPET-OEREPORT-GETCELLS-ALLPAGES-ROW-ALLCOLS


      .. _figure_OEReport_GetCells_AllPages_Row_AllCols:

      .. list-table:: **Example of accessing all cells on the given row on each page**. (The numbers inside the cells represent the order in which they are returned)
         :widths: 150 150 150 150 150
         :header-rows: 1

         * - page 1
           - page 2
           - page 3
           - page 4
           - page 5

         * - .. image:: ../images/OEReportIter-cells-allpages-row-allcols-1.*
           - .. image:: ../images/OEReportIter-cells-allpages-row-allcols-2.*
           - .. image:: ../images/OEReportIter-cells-allpages-row-allcols-3.*
           - .. image:: ../images/OEReportIter-cells-allpages-row-allcols-4.*
           - .. image:: ../images/OEReportIter-cells-allpages-row-allcols-5.*


      Example (:ref:`Figure: Example of accessing all cells on the given column on each page<figure_OEReport_GetCells_AllPages_AllRows_Col>`)

      .. oe:source:: OEReportIter.py
         :language: python
         :noindent:
         :frag:     SNIPPET-OEREPORT-GETCELLS-ALLPAGES-ALLROWS-COL

      .. oe:source:: OEReportIter.cpp
         :language: c++
         :noindent:
         :frag:     SNIPPET-OEREPORT-GETCELLS-ALLPAGES-ALLROWS-COL

      .. oe:source:: OEReportIter.java
         :language: java
         :noindent:
         :frag:     SNIPPET-OEREPORT-GETCELLS-ALLPAGES-ALLROWS-COL

      .. oe:source:: OEReportIter.cs
         :language: csharp
         :noindent:
         :frag:     SNIPPET-OEREPORT-GETCELLS-ALLPAGES-ALLROWS-COL


      .. _figure_OEReport_GetCells_AllPages_AllRows_Col:

      .. list-table:: **Example of accessing all cells on the given column on each page**. (The numbers inside the cells represent the order in which they are returned)
         :widths: 150 150 150 150 150
         :header-rows: 1

         * - page 1
           - page 2
           - page 3
           - page 4
           - page 5

         * - .. image:: ../images/OEReportIter-cells-allpages-allrows-col-1.*
           - .. image:: ../images/OEReportIter-cells-allpages-allrows-col-2.*
           - .. image:: ../images/OEReportIter-cells-allpages-allrows-col-3.*
           - .. image:: ../images/OEReportIter-cells-allpages-allrows-col-4.*
           - .. image:: ../images/OEReportIter-cells-allpages-allrows-col-5.*


      Example (:ref:`Figure: Example of accessing all cells on the given row and column on each page<figure_OEReport_GetCells_AllPages_Row_Col>`)

      .. oe:source:: OEReportIter.py
         :language: python
         :noindent:
         :frag:     SNIPPET-OEREPORT-GETCELLS-ALLPAGES-ROW-COL

      .. oe:source:: OEReportIter.cpp
         :language: c++
         :noindent:
         :frag:     SNIPPET-OEREPORT-GETCELLS-ALLPAGES-ROW-COL

      .. oe:source:: OEReportIter.java
         :language: java
         :noindent:
         :frag:     SNIPPET-OEREPORT-GETCELLS-ALLPAGES-ROW-COL

      .. oe:source:: OEReportIter.cs
         :language: csharp
         :noindent:
         :frag:     SNIPPET-OEREPORT-GETCELLS-ALLPAGES-ROW-COL


      .. _figure_OEReport_GetCells_AllPages_Row_Col:

      .. list-table:: **Example of accessing all cells on the given row and column on each page**. (The numbers inside the cells represent the order in which they are returned)
         :widths: 150 150 150 150 150
         :header-rows: 1

         * - page 1
           - page 2
           - page 3
           - page 4
           - page 5

         * - .. image:: ../images/OEReportIter-cells-allpages-row-col-1.*
           - .. image:: ../images/OEReportIter-cells-allpages-row-col-2.*
           - .. image:: ../images/OEReportIter-cells-allpages-row-col-3.*
           - .. image:: ../images/OEReportIter-cells-allpages-row-col-4.*
           - .. image:: ../images/OEReportIter-cells-allpages-row-col-5.*


      Example (:ref:`Figure: Example of accessing all cells on the given row and page<figure_OEReport_GetCells_Page_Row_AllCols>`)

      .. oe:source:: OEReportIter.py
         :language: python
         :noindent:
         :frag:     SNIPPET-OEREPORT-GETCELLS-PAGE-ROW-ALLCOLS

      .. oe:source:: OEReportIter.cpp
         :language: c++
         :noindent:
         :frag:     SNIPPET-OEREPORT-GETCELLS-PAGE-ROW-ALLCOLS

      .. oe:source:: OEReportIter.java
         :language: java
         :noindent:
         :frag:     SNIPPET-OEREPORT-GETCELLS-PAGE-ROW-ALLCOLS

      .. oe:source:: OEReportIter.cs
         :language: csharp
         :noindent:
         :frag:     SNIPPET-OEREPORT-GETCELLS-PAGE-ROW-ALLCOLS


      .. _figure_OEReport_GetCells_Page_Row_AllCols:

      .. list-table:: **Example of accessing all cells on the given row and page**. (The numbers inside the cells represent the order in which they are returned)
         :widths: 150 150 150 150 150
         :header-rows: 1

         * - page 1
           - page 2
           - page 3
           - page 4
           - page 5

         * - .. image:: ../images/OEReportIter-cells-page-row-allcols-1.*
           - .. image:: ../images/OEReportIter-cells-page-row-allcols-2.*
           - .. image:: ../images/OEReportIter-cells-page-row-allcols-3.*
           - .. image:: ../images/OEReportIter-cells-page-row-allcols-4.*
           - .. image:: ../images/OEReportIter-cells-page-row-allcols-5.*


      Example (:ref:`Figure: Example of accessing all cells on the given column and page<figure_OEReport_GetCells_Page_AllRows_Col>`)

      .. oe:source:: OEReportIter.py
         :language: python
         :noindent:
         :frag:     SNIPPET-OEREPORT-GETCELLS-PAGE-ALLROWS-COL

      .. oe:source:: OEReportIter.cpp
         :language: c++
         :noindent:
         :frag:     SNIPPET-OEREPORT-GETCELLS-PAGE-ALLROWS-COL

      .. oe:source:: OEReportIter.java
         :language: java
         :noindent:
         :frag:     SNIPPET-OEREPORT-GETCELLS-PAGE-ALLROWS-COL

      .. oe:source:: OEReportIter.cs
         :language: csharp
         :noindent:
         :frag:     SNIPPET-OEREPORT-GETCELLS-PAGE-ALLROWS-COL


      .. _figure_OEReport_GetCells_Page_AllRows_Col:

      .. list-table:: **Example of accessing all cells on the given column and page**. (The numbers inside the cells represent the order in which they are returned)
         :widths: 150 150 150 150 150
         :header-rows: 1

         * - page 1
           - page 2
           - page 3
           - page 4
           - page 5

         * - .. image:: ../images/OEReportIter-cells-page-allrows-col-1.*
           - .. image:: ../images/OEReportIter-cells-page-allrows-col-2.*
           - .. image:: ../images/OEReportIter-cells-page-allrows-col-3.*
           - .. image:: ../images/OEReportIter-cells-page-allrows-col-4.*
           - .. image:: ../images/OEReportIter-cells-page-allrows-col-5.*

      Example (:ref:`Figure: Example of accessing a cell on the given row, column and page<figure_OEReport_GetCells_Page_Row_Col>`)

      .. oe:source:: OEReportIter.py
         :language: python
         :noindent:
         :frag:     SNIPPET-OEREPORT-GETCELLS-PAGE-ROW-COL

      .. oe:source:: OEReportIter.cpp
         :language: c++
         :noindent:
         :frag:     SNIPPET-OEREPORT-GETCELLS-PAGE-ROW-COL

      .. oe:source:: OEReportIter.java
         :language: java
         :noindent:
         :frag:     SNIPPET-OEREPORT-GETCELLS-PAGE-ROW-COL

      .. oe:source:: OEReportIter.cs
         :language: csharp
         :noindent:
         :frag:     SNIPPET-OEREPORT-GETCELLS-PAGE-ROW-COL


      .. _figure_OEReport_GetCells_Page_Row_Col:

      .. list-table:: **Example of accessing a cell on the given row, column and page**. (The numbers inside the cells represent the order in which they are returned)
         :widths: 150 150 150 150 150
         :header-rows: 1

         * - page 1
           - page 2
           - page 3
           - page 4
           - page 5

         * - .. image:: ../images/OEReportIter-cells-page-row-col-1.*
           - .. image:: ../images/OEReportIter-cells-page-row-col-2.*
           - .. image:: ../images/OEReportIter-cells-page-row-col-3.*
           - .. image:: ../images/OEReportIter-cells-page-row-col-4.*
           - .. image:: ../images/OEReportIter-cells-page-row-col-5.*

      .. seealso::

         * :oe:meth:`OEDepict::OEReport::GetCell` method
         * :oe:meth:`OEDepict::OEReport::NewCell` method

   .. ################################################################
      #
      ################################################################

   .. oe:method:: GetFooter

      .. oe:language:: c++ java csharp

         .. oe:api::

            OEImageBase* GetFooter(unsigned int p)

      .. oe:language:: python

         .. oe:api:: python

            GetFooter(page: int) -> OEImageBase

      Returns the :ref:`OEImageBase <OEDepict_OEImageBase>` pointer of the
      footer on the :math:`p^{th}` page.

      *p*
         This value has to be in the range from `1` to
         :oe:meth:`OEDepict::OEReport::NumPages()<OEDepict::OEReport::NumPages>`.

      .. note::

         If the  :ref:`OEReport <OEDepict_OEReport>` object was initialized with footer
         height `0.0` or the :math:`p` page index is out of range, then
         the :oe:meth:`OEDepict::OEReport::GetFooter` method returns
         a NULL pointer.

      .. seealso::

         * :oe:meth:`OEDepict::OEReport::GetFooterHeight` method
         * :oe:meth:`OEDepict::OEReport::GetFooterWidth` method
         * :oe:meth:`OEDepict::OEReport::GetFooters` methods


   .. ################################################################
      #
      ################################################################

   .. oe:method:: GetFooterHeight

      .. oe:language:: c++ java csharp

         .. oe:api::

            double GetFooterHeight() const

      .. oe:language:: python

         .. oe:api:: python

            GetFooterHeight() -> float

      Returns the height of the footer at the bottom of each page.

      .. seealso::

         * :oe:meth:`OEDepict::OEReport::GetFooterWidth` method


   .. ################################################################
      #
      ################################################################

   .. oe:method:: GetFooterWidth

      .. oe:language:: c++ java csharp

         .. oe:api::

            double GetFooterWidth() const

      .. oe:language:: python

         .. oe:api:: python

            GetFooterWidth() -> float

      Returns the width of the footer at the bottom of each page.

      .. seealso::

         * :oe:meth:`OEDepict::OEReport::GetFooterHeight` methods


   .. ################################################################
      #
      ################################################################

   .. oe:method:: GetFooters

      .. oe:language:: c++ java csharp

         .. oe:api::

            OESystem::OEIterBase<OEImageBase>* GetFooters()

      .. oe:language:: python

         .. oe:api:: python

            GetFooters() -> Iterable[OEImageBase]

      Returns an iterator over all footers of the :ref:`OEReport <OEDepict_OEReport>`
      object.

      .. note::

         If the  :ref:`OEReport <OEDepict_OEReport>` object was initialized with footer
         height `0.0`, then the :oe:meth:`OEDepict::OEReport::GetFooters` method
         returns an empty iterator.

      Example (:ref:`Figure: Example of accessing all page footers of the report<figure_OEReport_GetFooters>`)

      .. oe:source:: OEReportIter.py
         :language: python
         :noindent:
         :frag:     SNIPPET-OEREPORT-GETFOOTERS

      .. oe:source:: OEReportIter.cpp
         :language: c++
         :noindent:
         :frag:     SNIPPET-OEREPORT-GETFOOTERS

      .. oe:source:: OEReportIter.java
         :language: java
         :noindent:
         :frag:     SNIPPET-OEREPORT-GETFOOTERS

      .. oe:source:: OEReportIter.cs
         :language: csharp
         :noindent:
         :frag:     SNIPPET-OEREPORT-GETFOOTERS


      .. _figure_OEReport_GetFooters:

      .. list-table:: **Example of accessing all page footers of the report**. (The numbers inside the footer areas represent the order in which they are returned)
         :widths: 150 150 150 150 150
         :header-rows: 1

         * - page 1
           - page 2
           - page 3
           - page 4
           - page 5

         * - .. image:: ../images/OEReportIter-footers-1.*
           - .. image:: ../images/OEReportIter-footers-2.*
           - .. image:: ../images/OEReportIter-footers-3.*
           - .. image:: ../images/OEReportIter-footers-4.*
           - .. image:: ../images/OEReportIter-footers-5.*

      .. seealso::

         * :oe:meth:`OEDepict::OEReport::GetFooter` method
         * :oe:meth:`OEDepict::OEReport::GetFooterHeight` method
         * :oe:meth:`OEDepict::OEReport::GetFooterWidth` method


   .. ################################################################
      #
      ################################################################

   .. oe:method:: GetHeader

      .. oe:language:: c++ java csharp

         .. oe:api::

            OEImageBase* GetHeader(unsigned int p)

      .. oe:language:: python

         .. oe:api:: python

            GetHeader(page: int) -> OEImageBase

      Returns the :ref:`OEImageBase <OEDepict_OEImageBase>` pointer of the
      header on the :math:`p^{th}` page.

      *p*
         This value has to be in the range from `1` to
         :oe:meth:`OEDepict::OEReport::NumPages()<OEDepict::OEReport::NumPages>`.

      .. note::

         If the  :ref:`OEReport <OEDepict_OEReport>` object was initialized with header
         height `0.0` or the :math:`p` page index is out of range, then the
         :oe:meth:`OEDepict::OEReport::GetHeader` method returns a NULL pointer.

      .. seealso::

         * :oe:meth:`OEDepict::OEReport::GetHeaderHeight` method
         * :oe:meth:`OEDepict::OEReport::GetHeaderWidth` method
         * :oe:meth:`OEDepict::OEReport::GetHeaders` method


   .. ################################################################
      #
      ################################################################

   .. oe:method:: GetHeaderHeight

      .. oe:language:: c++ java csharp

         .. oe:api::

            double GetHeaderHeight() const

      .. oe:language:: python

         .. oe:api:: python

            GetHeaderHeight() -> float

      Returns the height of the header at the top of each page.

      .. seealso::

         * :oe:meth:`OEDepict::OEReport::GetHeaderWidth` method


   .. ################################################################
      #
      ################################################################

   .. oe:method:: GetHeaderWidth

      .. oe:language:: c++ java csharp

         .. oe:api::

            double GetHeaderWidth() const

      .. oe:language:: python

         .. oe:api:: python

            GetHeaderWidth() -> float

      Returns the width of the header at the top of each page.

      .. seealso::

         * :oe:meth:`OEDepict::OEReportOptions::GetHeaderHeight` methods


   .. ################################################################
      #
      ################################################################

   .. oe:method:: GetHeaders

      .. oe:language:: c++ java csharp

         .. oe:api::

            OESystem::OEIterBase<OEImageBase>* GetHeaders()

      .. oe:language:: python

         .. oe:api:: python

            GetHeaders() -> Iterable[OEImageBase]

      Returns an iterator over all headers of the :ref:`OEReport <OEDepict_OEReport>`
      object.

      .. note::

         If the  :ref:`OEReport <OEDepict_OEReport>` object was initialized with header
         height `0.0`, then the :oe:meth:`OEDepict::OEReport::GetHeaders` method
         returns an empty iterator.

      Example (:ref:`Figure: Example of accessing all page headers of the report<figure_OEReport_GetHeaders>`)

      .. oe:source:: OEReportIter.py
         :language: python
         :noindent:
         :frag:     SNIPPET-OEREPORT-GETHEADERS

      .. oe:source:: OEReportIter.cpp
         :language: c++
         :noindent:
         :frag:     SNIPPET-OEREPORT-GETHEADERS

      .. oe:source:: OEReportIter.java
         :language: java
         :noindent:
         :frag:     SNIPPET-OEREPORT-GETHEADERS

      .. oe:source:: OEReportIter.cs
         :language: csharp
         :noindent:
         :frag:     SNIPPET-OEREPORT-GETHEADERS


      .. _figure_OEReport_GetHeaders:

      .. list-table:: **Example of accessing all page headers of the report**. (The numbers inside the header areas represent the order in which they are returned)
         :widths: 150 150 150 150 150
         :header-rows: 1

         * - page 1
           - page 2
           - page 3
           - page 4
           - page 5

         * - .. image:: ../images/OEReportIter-headers-1.*
           - .. image:: ../images/OEReportIter-headers-2.*
           - .. image:: ../images/OEReportIter-headers-3.*
           - .. image:: ../images/OEReportIter-headers-4.*
           - .. image:: ../images/OEReportIter-headers-5.*

      .. seealso::

         * :oe:meth:`OEDepict::OEReport::GetHeader` method
         * :oe:meth:`OEDepict::OEReport::GetHeaderHeight` method
         * :oe:meth:`OEDepict::OEReport::GetHeaderWidth` method


   .. ################################################################
      #
      ################################################################

   .. oe:method:: GetOptions

      .. oe:language:: c++ java csharp

         .. oe:api::

            const OEReportOptions& GetOptions() const

      .. oe:language:: python

         .. oe:api:: python

            GetOptions() -> OEReportOptions

      Returns the options used to initialize the
      :ref:`OEReport <OEDepict_OEReport>` object.

      .. seealso::

          * :ref:`OEReportOptions <OEDepict_OEReportOptions>` class

   .. ################################################################
      #
      ################################################################

   .. oe:method:: GetPage

      .. oe:language:: c++ java csharp

         .. oe:api::

            OEImageBase* GetPage(unsigned int p)

      .. oe:language:: python

         .. oe:api:: python

            GetPage(page: int) -> OEImageBase


      Returns the :ref:`OEImageBase <OEDepict_OEImageBase>` pointer of the
      :math:`p^{th}` page.

      *p*
         This value has to be in the range from `1` to
         :oe:meth:`OEDepict::OEReport::NumPages()<OEDepict::OEReport::NumPages>`.

      .. note::

         If :math:`p` page index is out of range, then the
         :oe:meth:`OEDepict::OEReport::GetPage` method returns a NULL
         pointer.

      .. seealso::

          * :oe:meth:`OEDepict::OEReport::GetPages` method


   .. ################################################################
      #
      ################################################################

   .. oe:method:: GetPageHeight

      .. oe:language:: c++ java csharp

         .. oe:api::

            double GetPageHeight() const

      .. oe:language:: python

         .. oe:api:: python

            GetPageHeight() -> float

      Returns the height of the pages of the report.

      .. seealso::

          * :oe:meth:`OEDepict::OEReportOptions::SetPageHeight` method


   .. ################################################################
      #
      ################################################################

   .. oe:method:: GetPageWidth

      .. oe:language:: c++ java csharp

         .. oe:api::

            double GetPageWidth() const

      .. oe:language:: python

         .. oe:api:: python

            GetPageWidth() -> float

      Returns the width of the pages of the report.

      .. seealso::

          * :oe:meth:`OEDepict::OEReportOptions::SetPageWidth` method


   .. ################################################################
      #
      ################################################################

   .. oe:method:: GetPages

      .. oe:language:: c++ java csharp

         .. oe:api::

            OESystem::OEIterBase<OEImageBase>* GetPages()

      .. oe:language:: python

         .. oe:api:: python

            GetPages() -> Iterable[OEImageBase]

      Returns an iterator over all the pages of the
      :ref:`OEReport <OEDepict_OEReport>` object.

      .. seealso::

          * :oe:meth:`OEDepict::OEReport::GetPage` method


   .. ################################################################
      #
      ################################################################

   .. oe:method:: IsBodyPage

      .. oe:language:: c++ java csharp

         .. oe:api::

            bool IsBodyPage(unsigned int p) const

      .. oe:language:: python

         .. oe:api:: python

            IsBodyPage(page: int) -> bool

      Returns whether the :math:`p^{th}` page of the report
      is created by calling the :oe:meth:`OEDepict::OEReport::NewBody`
      method.

      *p*
         This value has to be in the range from `1` to
         :oe:meth:`OEDepict::OEReport::NumPages()<OEDepict::OEReport::NumPages>`.

      For example, the :oe:meth:`OEDepict::OEReport::IsBodyPage` method
      returns `true` for the :math:`1^{st}` and :math:`5^{th}` pages of the report
      shown in :ref:`Figure: Example of report layout<figure_OEReport_IsBodyPage>`.

      .. _figure_OEReport_IsBodyPage:

      .. list-table:: **Example of report layout**
         :widths: 150 150 150 150 150 150
         :header-rows: 1

         * -
           - page 1
           - page 2
           - page 3
           - page 4
           - page 5

         * -
           - .. image:: ../images/OEReportIter-pages-1.*
           - .. image:: ../images/OEReportIter-pages-2.*
           - .. image:: ../images/OEReportIter-pages-3.*
           - .. image:: ../images/OEReportIter-pages-4.*
           - .. image:: ../images/OEReportIter-pages-5.*

         * - IsBodyPage
           - true
           - false
           - false
           - false
           - true

      .. seealso::

          * :oe:meth:`OEDepict::OEReport::IsGridPage`  method
          * :oe:meth:`OEDepict::OEReport::NewBody` method


   .. ################################################################
      #
      ################################################################

   .. oe:method:: IsGridPage

      .. oe:language:: c++ java csharp

         .. oe:api::

            bool IsGridPage(unsigned int p) const

      .. oe:language:: python

         .. oe:api:: python

            IsGridPage(page: int) -> bool

      Returns whether the :math:`p^{th}` page of the report
      is created by calling the :oe:meth:`OEDepict::OEReport::NewCell`
      method.

      *p*
         This value has to be in the range from `1` to
         :oe:meth:`OEDepict::OEReport::NumPages()<OEDepict::OEReport::NumPages>`.

      For example, the :oe:meth:`OEDepict::OEReport::IsGridPage` method returns
      `true` for the :math:`2^{nd}`, :math:`3^{rd}`, and :math:`4^{th}` pages
      of the report shown in
      :ref:`Figure: Example of report layout<figure_OEReport_IsGridPage>`.

      .. _figure_OEReport_IsGridPage:

      .. list-table:: **Example of report layout**
         :widths: 150 150 150 150 150 150
         :header-rows: 1

         * -
           - page 1
           - page 2
           - page 3
           - page 4
           - page 5

         * -
           - .. image:: ../images/OEReportIter-pages-1.*
           - .. image:: ../images/OEReportIter-pages-2.*
           - .. image:: ../images/OEReportIter-pages-3.*
           - .. image:: ../images/OEReportIter-pages-4.*
           - .. image:: ../images/OEReportIter-pages-5.*

         * - IsGridPage
           - false
           - true
           - true
           - true
           - false

      .. seealso::

          * :oe:meth:`OEDepict::OEReport::IsBodyPage` method
          * :oe:meth:`OEDepict::OEReport::NewCell` method


   .. ################################################################
      #
      ################################################################

   .. oe:method:: NewBody

      .. oe:language:: c++ java csharp

         .. oe:api::

            OEImageBase* NewBody()

      .. oe:language:: python

         .. oe:api:: python

            NewBody() -> OEImageBase

      Creates a new *body* layout page and returns the area
      between the header and the footer.
      See example in :ref:`Figure: Example of creating a new body page<figure_OEReport_NewBody>`.

      .. note::

         The height and width of the returned area depend on the options
         with which the :ref:`OEReport <OEDepict_OEReport>` object was constructed:
         page margins, gap between the cells, and the height of the
         header and footer.

      .. _figure_OEReport_NewBody:

      .. list-table:: **Example of creating a new body page** (The area returned by the NewBody method is highlighted by red color)
         :widths: 150 150 150
         :header-rows: 1

         * - page 1
           - page 2
           - page 3

         * - .. image:: ../images/OEReport-NewBody-1.*
           - .. image:: ../images/OEReport-NewBody-2.*
           - .. image:: ../images/OEReport-NewBody-3.*

      .. seealso::

          * :oe:meth:`OEDepict::OEReport::IsBodyPage` method
          * :oe:meth:`OEDepict::OEReport::GetBody` method
          * :oe:meth:`OEDepict::OEReport::GetBodies` method


   .. ################################################################
      #
      ################################################################

   .. oe:method:: NewCell

      .. oe:language:: c++ java csharp

         .. oe:api::

            OEImageBase* NewCell()

      .. oe:language:: python

         .. oe:api:: python

            NewCell() -> OEImageBase

      Creates and returns a new cell.
      If the last page of the report is a *grid* page, then a new cell
      is created from left to right and top to bottom order.
      If no more cells are left on the *grid* page or the last page is a *body*
      page, then a new *grid* page is created before returning the
      first cell of this new page.
      See example in :ref:`Figure: Example of creating a new cell<figure_OEReport_NewCell>`.

      .. note::

         The cells of a grid page are equal-sized and evenly spaced.
         The height and width of the cells depend on the options with which the
         :ref:`OEReport <OEDepict_OEReport>` object was constructed: the number of
         rows and columns per page, page margins, gap between the cells,
         and the height of the header and footer.

      .. _figure_OEReport_NewCell:

      .. list-table:: **Example of creating a new cell** (The area i.e. the cell returned by the NewCell method is highlighted by red color)
         :widths: 150 150 150
         :header-rows: 1

         * - page 1
           - page 2
           - page 3

         * - .. image:: ../images/OEReport-NewCell-1.*
           - .. image:: ../images/OEReport-NewCell-2.*
           - .. image:: ../images/OEReport-NewCell-3.*

      .. seealso::

          * :oe:meth:`OEDepict::OEReport::IsGridPage` method
          * :oe:meth:`OEDepict::OEReport::GetCell` method
          * :oe:meth:`OEDepict::OEReport::GetCells` method


   .. ################################################################
      #
      ################################################################

   .. oe:method:: NumBodyPages

      .. oe:language:: c++ java csharp

         .. oe:api::

            unsigned int NumBodyPages() const

      .. oe:language:: python

         .. oe:api:: python

            NumBodyPages() -> int

      Returns the number of *body* pages of the :ref:`OEReport <OEDepict_OEReport>`
      object, *i.e.* the number of pages for which the
      :oe:meth:`OEDepict::OEReport::IsBodyPage` method returns `true`.

      .. seealso::

         * :oe:meth:`OEDepict::OEReport::IsBodyPage` method
         * :oe:meth:`OEDepict::OEReport::NumGridPages` method
         * :oe:meth:`OEDepict::OEReport::NumPages` method


   .. ################################################################
      #
      ################################################################

   .. oe:method:: NumColsPerPage

      .. oe:language:: c++ java csharp

         .. oe:api::

            unsigned int NumColsPerPage() const

      .. oe:language:: python

         .. oe:api:: python

            NumColsPerPage() -> int

      Returns the number of columns on each *grid* page of the
      :ref:`OEReport <OEDepict_OEReport>` object.

      .. seealso::

         * :oe:meth:`OEDepict::OEReport::NumRowsPerPage` method


   .. ################################################################
      #
      ################################################################

   .. oe:method:: NumGridPages

      .. oe:language:: c++ java csharp

         .. oe:api::

            unsigned int NumGridPages() const

      .. oe:language:: python

         .. oe:api:: python

            NumGridPages() -> int

      Returns the number of *grid* pages of the :ref:`OEReport <OEDepict_OEReport>`
      object, *i.e.* the number of pages for which the
      :oe:meth:`OEDepict::OEReport::IsGridPage` method returns `true`.

      .. seealso::

         * :oe:meth:`OEDepict::OEReport::IsGridPage` method
         * :oe:meth:`OEDepict::OEReport::NumBodyPages` method
         * :oe:meth:`OEDepict::OEReport::NumPages` method

   .. ################################################################
      #
      ################################################################

   .. oe:method:: NumPages

      .. oe:language:: c++ java csharp

         .. oe:api::

            unsigned int NumPages() const

      .. oe:language:: python

         .. oe:api:: python

            NumPages() -> int

      Returns the number of pages of the :ref:`OEReport <OEDepict_OEReport>`
      object. This is the sum of the numbers returned by the
      :oe:meth:`OEDepict::OEReport::NumBodyPages` and
      :oe:meth:`OEDepict::OEReport::NumGridPages` methods.

      .. seealso::

         * :oe:meth:`OEDepict::OEReport::NumBodyPages` method
         * :oe:meth:`OEDepict::OEReport::NumGridPages` method

   .. ################################################################
      #
      ################################################################

   .. oe:method:: NumRowsPerPage

      .. oe:language:: c++ java csharp

         .. oe:api::

            unsigned int NumRowsPerPage() const

      .. oe:language:: python

         .. oe:api:: python

            NumRowsPerPage() -> int

      Returns the number of rows on each *grid* page of the
      :ref:`OEReport <OEDepict_OEReport>` object.

      .. seealso::

         * :oe:meth:`OEDepict::OEReport::NumColsPerPage` method
