OEReportOptions

class OEReportOptions

This class represents the OEReportOptions class that encapsulates properties that determine the layout of a OEReport object.

See Figure: Schematic representation of documents that can be created using the OEReport class.

../../_images/OEReportLayout.png

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

The OEReportOptions class stores the following properties:

Property

Get method

Set method

Corresponding namespace / class / type

rows per page

NumRowsPerPage

set upon construction

integer greater than 0

columns per page

NumColsPerPage

set upon construction

integer greater than 0

page width

GetPageWidth

SetPageWidth / SetPageSize / SetPageOrientation

floating point number / OEPageSize / OEPageOrientation

page height

GetPageHeight

SetPageHeight / SetPageSize / SetPageOrientation

floating point number / OEPageSize / OEPageOrientation

page margins

GetPageMargin

SetPageMargin / SetPageMargins

OEMargin

cell gap

GetCellGap

SetCellGap

floating point number

header height

GetHeaderHeight

SetHeaderHeight

floating point number

header width

GetHeaderWidth

N/A

floating point number

footer height

GetFooterHeight

SetFooterHeight

floating point number

footer width

GetFooterWidth

N/A

floating point number

See also

Constructors

OEReportOptions(unsigned int rowsperpage = 3, unsigned int colsperpage = 2)
rowsperpage

The number of rows on each grid page of the report.

colsperpage

The number of columns on each grid page of the report.

Note

Both the number of rows and columns per page have to be greater than 0.

Default parameters of OEReportOptions

Property

Default value

rows per page

3

columns per page

2

page width

OEGetPageWidth ( OEPageSize.US_Letter )

page height

OEGetPageHeight ( OEPageSize.US_Letter )

margins

20.0 (for each margins: top, bottom, left and right)

cell gap

5.0

header height

0.0 (no header is generated by default)

footer height

0.0 (no footer is generated by default)

Example (Figure: Example of report generation with default options)

OEReportOptions opts = new OEReportOptions(3, 2);
Example of report generation with default options (The scale of the shown pages is 1:4)
../../_images/OEReportOptions_Default-1.png ../../_images/OEReportOptions_Default-2.png
OEReportOptions(const OEReportOptions &rhs)

Copy constructor.

operator=

OEReportOptions &operator=(const OEReportOptions &rhs)

Assignment operator.

GetCellGap

double GetCellGap() const

Returns the space between the cells of the report.

See also

GetCellHeight

double GetCellHeight() const

Returns the height of the cells on the grid pages of the report.

Note

The height of the cells depends on the number of rows per page, the top and bottom margins, header and footer heights, and the gap between the cells

GetCellWidth

double GetCellWidth() const

Returns the width of the cells on the grid pages of the report.

Note

The width of the cells depends on the number of columns per page, the left and right margins, and the gap between the cells.

GetFooterHeight

double GetFooterHeight() const

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

GetFooterWidth

double GetFooterWidth() const

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

GetHeaderHeight

double GetHeaderHeight() const

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

GetHeaderWidth

double GetHeaderWidth() const

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

GetPageHeight

double GetPageHeight() const

Returns the height of the page of the report.

GetPageMargin

double GetPageMargin(unsigned int margin) const

Returns the size of a specific page margin of the report.

margin

This value has to be from the OEMargin namespace.

GetPageWidth

double GetPageWidth() const

Returns the width of the page of the report.

NumColsPerPage

unsigned int NumColsPerPage() const

Returns the number of columns on each grid page of the report.

NumRowsPerPage

unsigned int NumRowsPerPage() const

Returns the number of rows on each grid page of the report.

SetCellGap

void SetCellGap(double size)

Sets the space between the cells of the report.

size

This value has to be a non-negative number.

Example (Figure: Example of using the SetCellGap method)

OEReportOptions opts = new OEReportOptions(3, 2);
opts.SetCellGap(100);
Example of using the SetCellGap method (The scale of the shown pages is 1:4)
../../_images/OEReportOptions_SetCellGap-1.png ../../_images/OEReportOptions_SetCellGap-2.png

See also

SetFooterHeight

void SetFooterHeight(double height)

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

height

This value has to be a non-negative number.

Note

0.0 means that a footer is not going to be created on the pages.

Example (Figure: Example of using the SetFooterHeight method)

Example of using the SetFooterHeight method (The scale of the shown pages is 1:4)
../../_images/OEReportOptions_SetFooterHeight-1.png ../../_images/OEReportOptions_SetFooterHeight-2.png

SetHeaderHeight

void SetHeaderHeight(double height)

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

height

This value has to be a non-negative number.

Note

0.0 means that a header is not going to be created on the pages.

Example (Figure: Example of using the SetHeaderHeight method)

OEReportOptions opts = new OEReportOptions(3, 2);
opts.SetHeaderHeight(100);
Example of using the SetHeaderHeight method (The scale of the shown pages is 1:4)
../../_images/OEReportOptions_SetHeaderHeight-1.png ../../_images/OEReportOptions_SetHeaderHeight-2.png

SetPageHeight

void SetPageHeight(double height)

Sets the height of the pages of the report.

height

This number has to be greater than 0.0.

Example (Figure: Example of using the SetPageHeight method)

OEReportOptions opts = new OEReportOptions(3, 2);
opts.SetPageHeight(opts.GetPageHeight()*0.50);
Example of using the SetPageHeight method (The scale of the shown pages is 1:4)
../../_images/OEReportOptions_SetPageHeight-1.png ../../_images/OEReportOptions_SetPageHeight-2.png

SetPageMargin

void SetPageMargin(unsigned int margin, double size)

Sets the size of a specific page margin of the report.

margin

This value has to be from the OEMargin namespace.

size

This value has to be a non-negative number.

Example (Figure: Example of using the SetPageMargin method)

OEReportOptions opts = new OEReportOptions(3, 2);
opts.SetPageMargin(OEMargin.Left,  100);
opts.SetPageMargin(OEMargin.Right, 100);
Example of using the SetPageMargin method (The scale of the shown pages is 1:4)
../../_images/OEReportOptions_SetPageMargin-1.png ../../_images/OEReportOptions_SetPageMargin-2.png

SetPageMargins

void SetPageMargins(double size)

Sets the size of all the margins of the report.

size

This value has to be a non-negative number.

Example (Figure: Example of using the SetPageMargins method)

OEReportOptions opts = new OEReportOptions(3, 2);
opts.SetPageMargins(100);
Example of using the SetPageMargins method (The scale of the shown pages is 1:4)
../../_images/OEReportOptions_SetPageMargins-1.png ../../_images/OEReportOptions_SetPageMargins-2.png

SetPageOrientation

void SetPageOrientation(unsigned int orientation)

Sets the orientation of the pages of the report.

orientation

This value has to be from the OEPageOrientation namespace.

Example (Figure: Example of using the SetPageOrientation method)

OEReportOptions opts = new OEReportOptions(3, 2);
opts.SetPageOrientation(OEPageOrientation.Landscape);
Example of using the SetPageOrientation method (The scale of the shown pages is 1:4)
../../_images/OEReportOptions_SetPageOrientation-1.png ../../_images/OEReportOptions_SetPageOrientation-2.png

SetPageSize

void SetPageSize(unsigned int pagesize)

Sets the width and height of the pages of the report.

pagesize

This value has to be from the OEPageSize namespace.

Example (Figure: Example of using the SetPageSize method)

OEReportOptions opts = new OEReportOptions(3, 2);
opts.SetPageSize(OEPageSize.US_Legal);
Example of using the SetPageSize method (The scale of the shown pages is 1:4)
../../_images/OEReportOptions_SetPageSize-1.png ../../_images/OEReportOptions_SetPageSize-2.png

SetPageWidth

void SetPageWidth(double width)

Sets the width of the pages of the report.

width

This number has to be greater than 0.0.

Example (Figure: Example of using the SetPageWidth method)

Example of using the SetPageWidth method (The scale of the shown pages is 1:4)
../../_images/OEReportOptions_SetPageWidth-1.png ../../_images/OEReportOptions_SetPageWidth-2.png