Four Js Genero Report Writer
libgreprops.h File Reference
#include <math.h>

Go to the source code of this file.

Functions

void setXMLEncoding (RuntimeConfigurationPtr rcPtr, const char *xmlEncoding)
 
char * getPIAttributes (RuntimeConfigurationPtr rcPtr)
 
void setProcessLevelDataFile (RuntimeConfigurationPtr rcPtr, const char *dataFileName)
 
void setAutoformatType (RuntimeConfigurationPtr rcPtr, enum autoformatTypeEnum type)
 
void setSharePortWithGDC (RuntimeConfigurationPtr rcPtr, enum boolean share)
 
void setCallbackLocalization (RuntimeConfigurationPtr rcPtr, enum boolean value)
 
void configureLocalization (RuntimeConfigurationPtr rcPtr, const char *charSet, const char *resourcePath, const char *numberFormat, const char *dateFormat)
 
void selectLogicalPageMapping (RuntimeConfigurationPtr rcPtr, enum logicalPageMappingEnum mapping)
 
void configureLabelOutput (RuntimeConfigurationPtr rcPtr, const char *paperWidth, const char *paperHeight, const char *labelWidth, const char *labelHeight, int labelsPerRow, int labelsPerColumn)
 
void configureSVGDevice (RuntimeConfigurationPtr rcPtr, enum boolean antialiasFonts, enum boolean antialiasShapes, enum boolean embedFonts, enum SVGCharsetToEmbedEnum charsetToEmbed)
 
void setSVGCompression (RuntimeConfigurationPtr rcPtr, enum boolean compressOutput)
 
void setBrowserDocumentDirectory (RuntimeConfigurationPtr rcPtr, const char *directory)
 
void setBrowserDocumentDirectoryURL (RuntimeConfigurationPtr rcPtr, const char *directory)
 
void setBrowserFontDirectory (RuntimeConfigurationPtr rcPtr, const char *directory)
 
void setBrowserFontDirectoryURL (RuntimeConfigurationPtr rcPtr, const char *directory)
 
void setBrowserFontFileFormat (RuntimeConfigurationPtr rcPtr, enum BrowserFontFileFormatEnum format)
 
void configureImageDevice (RuntimeConfigurationPtr rcPtr, enum boolean antialiasFonts, enum boolean antialiasShapes, enum boolean monochrome, int fromPage, int toPage, const char *fileType, const char *filePath, const char *fileNamePrefix, int resolution)
 
void setImageUsePageNamesAsFileNames (RuntimeConfigurationPtr rcPtr, enum boolean value)
 
void setImageShrinkImagesToPageContent (RuntimeConfigurationPtr rcPtr, enum boolean value)
 
void configurePDFDevice (RuntimeConfigurationPtr rcPtr, const char *fontDirectory, enum boolean antialiasFonts, enum boolean antialiasShapes, enum boolean monochrome, int fromPage, int toPage)
 
void configurePDFFontEmbedding (RuntimeConfigurationPtr rcPtr, enum boolean preferUnicodeEncoding)
 
void setPDFJPEGImageEncoding (RuntimeConfigurationPtr rcPtr, enum boolean encodeImagesAsJPEG, float jpegQuality)
 
void setPDFImageResolution (RuntimeConfigurationPtr rcPtr, int imagesResolution)
 
void configureXLSDevice (RuntimeConfigurationPtr rcPtr, int fromPage, int toPage, enum boolean removeWhitespace, enum boolean ignoreRowAlignment, enum boolean ignoreColumnAlignment, enum boolean removeBackgroundImages, enum boolean mergePages)
 
void setXLSMergeCells (RuntimeConfigurationPtr rcPtr, enum boolean mergeCells)
 
void configureXLSXDevice (RuntimeConfigurationPtr rcPtr, int fromPage, int toPage, enum boolean removeWhitespace, enum boolean ignoreRowAlignment, enum boolean ignoreColumnAlignment, enum boolean removeBackgroundImages, enum boolean mergePages)
 
void setXLSXMergeCells (RuntimeConfigurationPtr rcPtr, enum boolean mergeCells)
 
void configureHTMLDevice (RuntimeConfigurationPtr rcPtr, int fromPage, int toPage, enum boolean embedImages, const char *imageGenerationDirectory, const char *imageURLPrefix, enum boolean removeWhitespace, enum boolean ignoreRowAlignment, enum boolean ignoreColumnAlignment, enum boolean removeBackgroundImages)
 
void configureRTFDevice (RuntimeConfigurationPtr rcPtr, int fromPage, int toPage, int imagesResolution, enum RTFImagesFormatEnum imagesFormat)
 
void configureOORTFDevice (RuntimeConfigurationPtr rcPtr, int fromPage, int toPage, int imagesResolution, enum RTFImagesFormatEnum imagesFormat)
 
void setRTFMemoryThreshold (RuntimeConfigurationPtr rcPtr, int memoryThreshold)
 
void configureCompatibilityOutput (RuntimeConfigurationPtr rcPtr, int pageWidthInCharacters, const char *fontName, enum boolean fidelity, const char *reportName, const char *reportCategory, const char *systemId)
 
void configureAutoformatOutput (RuntimeConfigurationPtr rcPtr, const char *fontName, int fontSize, enum boolean fidelity, const char *reportTitle, const char *fieldNamePatterns, const char *systemId)
 
void configureCompatibilityOutput1 (RuntimeConfigurationPtr rcPtr, int pageWidthInCharacters, const char *fontName, enum boolean fidelity, const char *reportName, const char *reportCategory, const char *systemId, enum boolean outputCompleteLines, enum boolean ignoreLeftMargin, enum boolean ignoreTopMargin)
 
void configurePageSize (RuntimeConfigurationPtr rcPtr, const char *pageWidth, const char *pageHeight)
 
void setTitle (RuntimeConfigurationPtr rcPtr, const char *title)
 
void setAuthor (RuntimeConfigurationPtr rcPtr, const char *author)
 
void setCreator (RuntimeConfigurationPtr rcPtr, const char *creator)
 
void setSubject (RuntimeConfigurationPtr rcPtr, const char *subject)
 
void setKeywords (RuntimeConfigurationPtr rcPtr, const char *keywords)
 
void setOutputFileName (RuntimeConfigurationPtr rcPtr, const char *fileName)
 
void setPageMargins (RuntimeConfigurationPtr rcPtr, const char *topMargin, const char *bottomMargin, const char *leftMargin, const char *rightMargin)
 
void markOverfullBoxesInDocument (RuntimeConfigurationPtr rcPtr, enum boolean value)
 
void setPageSwappingThreshold (RuntimeConfigurationPtr rcPtr, int value)
 
void setPaperMargins (RuntimeConfigurationPtr rcPtr, const char *topMargin, const char *bottomMargin, const char *leftMargin, const char *rightMargin)
 
void configureMultipageOutput (RuntimeConfigurationPtr rcPtr, int pageExponent, int isoNumber, enum boolean portrait)
 
void selectDevice (RuntimeConfigurationPtr rcPtr, enum outputDeviceEnum device)
 
void configureSVGPreview (RuntimeConfigurationPtr rcPtr, enum SVGPreviewTypeEnum type)
 
void setSVGPageRange (RuntimeConfigurationPtr rcPtr, int fromPage, int toPage)
 
void setPrinterFidelity (RuntimeConfigurationPtr rcPtr, enum boolean fidelity)
 
void setPrinterName (RuntimeConfigurationPtr rcPtr, const char *printerName)
 
void setSVGPrinterName (RuntimeConfigurationPtr rcPtr, const char *printerName)
 
void setPrinterChromaticity (RuntimeConfigurationPtr rcPtr, const char *chromaticity)
 
void setPrinterMediaSizeName (RuntimeConfigurationPtr rcPtr, const char *mediaSizeName)
 
void setPrinterMediaTray (RuntimeConfigurationPtr rcPtr, const char *mediaTray)
 
void setSVGPaperSource (RuntimeConfigurationPtr rcPtr, const char *paperSource)
 
void setPrinterMediaName (RuntimeConfigurationPtr rcPtr, const char *mediaName)
 
void setPrinterJobSheets (RuntimeConfigurationPtr rcPtr, const char *jobSheets)
 
void setPrinterOrientationRequested (RuntimeConfigurationPtr rcPtr, const char *orientationRequested)
 
void setSVGOrientationRequested (RuntimeConfigurationPtr rcPtr, const char *orientationRequested)
 
void setPrinterPrintQuality (RuntimeConfigurationPtr rcPtr, const char *printQuality)
 
void setPrinterSheetCollate (RuntimeConfigurationPtr rcPtr, const char *sheetCollate)
 
void setSVGSheetCollate (RuntimeConfigurationPtr rcPtr, const char *sheetCollate)
 
void setPrinterCopies (RuntimeConfigurationPtr rcPtr, int copies)
 
void setSVGCopies (RuntimeConfigurationPtr rcPtr, int copies)
 
void setPrinterSides (RuntimeConfigurationPtr rcPtr, const char *sides)
 
void setPrinterJobMediaSheets (RuntimeConfigurationPtr rcPtr, int jobMediaSheets)
 
void setPrinterJobImpressions (RuntimeConfigurationPtr rcPtr, int jobImpressions)
 
void setPrinterJobName (RuntimeConfigurationPtr rcPtr, const char *jobName)
 
void setPrinterJobPriority (RuntimeConfigurationPtr rcPtr, int jobPriority)
 
void setPrinterNumberUp (RuntimeConfigurationPtr rcPtr, int numberUp)
 
void setPrinterPageRanges (RuntimeConfigurationPtr rcPtr, const char *pageRanges)
 
void setPrinterResolution (RuntimeConfigurationPtr rcPtr, const char *resolution)
 
void setPrinterRequestingUserName (RuntimeConfigurationPtr rcPtr, const char *requestingUserName)
 
void setPrinterDestinationUrl (RuntimeConfigurationPtr rcPtr, const char *destination)
 
void setPrinterWriteToFile (RuntimeConfigurationPtr rcPtr, const char *file)
 
void configureDistributedProcessing (RuntimeConfigurationPtr rcPtr, const char *host, int port)
 
void configureDistributedEnvironment (RuntimeConfigurationPtr rcPtr, const char *FGLDIR, const char *FGLPROFILE, const char *FGLRESOURCEPATH, const char *DBPATH)
 
void setDistributedRequestingUserName (RuntimeConfigurationPtr rcPtr, const char *requestingUserName)
 
void setEnvironment (RuntimeConfigurationPtr rcPtr, const char *values)
 
void setRenderingHints (RuntimeConfigurationPtr rcPtr, const char *values)
 
void setPrinterPJLVariables (RuntimeConfigurationPtr rcPtr, const char *values)
 

Detailed Description

API Functions for Reports.

Error Handling In case of an error, functions from this library will write error messages to standard out using the DISPLAY statement. Additionally the error condition is indicated by a return value.

Verbosity level Depending on the value of the environment variable "GREDEBUG" Some of the functions issue warnings and other useful debugging information. Currently any value greater zero will cause debug output. Debug output is also output using the DISPLAY statement.

Function Documentation

void configureAutoformatOutput ( RuntimeConfigurationPtr  rcPtr,
const char *  fontName,
int  fontSize,
enum boolean  fidelity,
const char *  reportTitle,
const char *  fieldNamePatterns,
const char *  systemId 
)

Function to configure the output when auto formatting is enabled

This function is applicable when no .4rp template has been specified in the call to either loadCurrentSettings or loadAndCommit and auto formatting with a different value than "COMPATIBILITY" has been selected by a call to setAutoformatType. All argument to this function are optional (indicated by passing a null value).

Parameters
fontNameSpecifies the font to use. The default value depends on the selected type. For the type "COMPATIBILITY" the default value is "Lucida Console" on Windows systems and "Lucida Sans Typewriter" on all other systems. For the other types "FLAT LIST" and "NEW LIST" the default value is the logical font "SansSerif".
fontSizeSpecifies the font size to use. The default value depends on the selected type. For the type "COMPATIBILITY" the value is ignored since the best font size is automatically selected. For the other types "FLAT LIST" and "NEW LIST" the default value is 12.
fidelitySpecifies whether or not to set the "fidelity" property for the produced WORDBOX objects. See the documentation on WORDBOX for more information.
reportTitleTitle of the report. The default value depends on the selected type. For the type "COMPATIBILITY" the value is ignored. For the type "FLAT LIST" the default value is "Report Title Here" and for the type "NEW LIST" the default value is the empty string.
fieldNamePatternsA comma separated list of field name patterns. Fields not matching any of the patterns are not printed. The patterns may contain literal characters, the '?', the '*' and character ranges as defined for the 4GL MATCH operator. The columns of the output are sorted in order of the patterns matched and within one pattern by the relative position of the field in the PRINT statement. By default all fields are printed.
systemIdSpecifies an absolute URL against which relative resources such as images in overlays are resolved. By default external resources need to be specified with absolute URLs.
void configureCompatibilityOutput ( RuntimeConfigurationPtr  rcPtr,
int  pageWidthInCharacters,
const char *  fontName,
enum boolean  fidelity,
const char *  reportName,
const char *  reportCategory,
const char *  systemId 
)

Function to configure the output for ASCII reports

This function is applicable when no .4rp template has been specified in the call to either loadCurrentSettings or loadAndCommit. All argument to this function are optional (indicated by passing a null value).

Parameters
pageWidthInCharactersFor reports that do not contain a RIGHT MARGIN specification this value should be set. In case that the report does not contain a RIGHT MARGIN specification and this value is not set, a value of 132 is assumed.
fontNameSpecifies the font to use. Per default a fixed pitch font is used.
fidelitySpecifies whether or not to set the "fidelity" property for the produced WORDBOX objects. See the documentation on WORDBOX for more information.
reportNameSpecifies the "name" of the report. The value specified is passed in the overloadable callback function compat_placePageBackground in CompatCustom.4gl. Since build 1726 of the DVM it is no longer necessary to specify this value since the value is automatically set to the name of the executing report.
reportCategorySpecifies the "category" of the report. The value specified is passed in the overloadable callback function compat_placePageBackground in CompatCustom.4gl.
systemIdSpecifies an absolute URL against which relative resources such as images in overlays are resolved.
void configureCompatibilityOutput1 ( RuntimeConfigurationPtr  rcPtr,
int  pageWidthInCharacters,
const char *  fontName,
enum boolean  fidelity,
const char *  reportName,
const char *  reportCategory,
const char *  systemId,
enum boolean  outputCompleteLines,
enum boolean  ignoreLeftMargin,
enum boolean  ignoreTopMargin 
)

Function to configure the output for ASCII reports

This function is applicable when no .4rp template has been specified in the call to either loadCurrentSettings or loadAndCommit. All argument to this function are optional (indicated by passing a null value).

Parameters
pageWidthInCharactersFor reports that do not contain a RIGHT MARGIN specification this value should be set. In case that the report does not contain a RIGHT MARGIN specification and this value is not set, a value of 132 is assumed.
fontNameSpecifies the font to use. Per default a fixed pitch font is used.
fidelitySpecifies whether or not to set the "fidelity" property for the produced WORDBOX objects. See the documentation on WORDBOX for more information.
reportNameSpecifies the "name" of the report. The value specified is passed in the overloadable callback function compat_placePageBackground in CompatCustom.4gl. Since build 1726 of the DVM it is no longer necessary to specify this value since the value is automatically set to the name of the executing report.
reportCategorySpecifies the "category" of the report. The value specified is passed in the overloadable callback function compat_placePageBackground in CompatCustom.4gl.
systemIdSpecifies an absolute URL against which relative resources such as images in overlays are resolved.
outputCompleteLinesSpecifies whether or lines are printed with a single element for the entire line or with a specific element for each argument to the PRINT instruction of the line in question. The visual result is identical in both cases but printing lines as a whole is more efficient. Instructing the output to be generated itemwise allows to process the items individually in the overloadable function compat_outputLinePart() in CompatCustom.4gl. This function enables the interpretation of escape sequences or the conversion of "ASCII-art" into graphical elements. By default lines are output as a whole. An exception to this rule is when "XLS" or "XLSX" output is selected. In this case lines are output as items and the value of this parameter is irrelevant.
ignoreLeftMarginInstructs the formatter to ignore any LEFT MARGIN value in the report. Margins can be added by calling setPageMargins. By default this option is set.
ignoreTopMarginInstructs the formatter to ignore any TOP MARGIN value in the report. Margins can be added by calling setPageMargins. By default this option is set.
void configureDistributedEnvironment ( RuntimeConfigurationPtr  rcPtr,
const char *  FGLDIR,
const char *  FGLPROFILE,
const char *  FGLRESOURCEPATH,
const char *  DBPATH 
)

Function to configure the enviroment in case of distributed processing

This function allows to configure the environment. It is intended for the case of distributed processing with a server running on a different physical machine with different resource paths. Note that it is not necessary to call this function if the daemon is running on the local machine or if the remote machine has identical resource directories.

Parameters
FGLDIRSpecifies the value of the environment variable FGLDIR. Passing NULL for this value will default to the process environment variable value.
FGLPROFILESpecifies the value of the environment variable FGLPROFILE. Passing NULL for this value will default to the process environment variable.
FGLRESOURCEPATHSpecifies the value of the environment variable FGLRESOURCEPATH. Passing NULL for this value will default to the process environment variable.
DBPATHSpecifies the value of the environment variable DBPATH. Passing NULL for this value will default to the environment process environment variable value.
void configureDistributedProcessing ( RuntimeConfigurationPtr  rcPtr,
const char *  host,
int  port 
)

Function to configure processing via a dedicated server

This function allows to specify a server on which a report engine is running in server mode. The engine is started on the remote machine via the command $GREDIR/bin/greportwriter -l port.

Parameters
hostSpecified the host name.
portSpecifies the port.
void configureHTMLDevice ( RuntimeConfigurationPtr  rcPtr,
int  fromPage,
int  toPage,
enum boolean  embedImages,
const char *  imageGenerationDirectory,
const char *  imageURLPrefix,
enum boolean  removeWhitespace,
enum boolean  ignoreRowAlignment,
enum boolean  ignoreColumnAlignment,
enum boolean  removeBackgroundImages 
)

Function to configure the HTML output

This function is applicable when HTML output has been selected by a call to the function selectDevice. All arguments to this function are optional (indicated by passing a null value). In case that the HTML document should be written to a file, the general function setOutputFileName and selectPreview (4GL only) are available for this purpose.

Parameters
fromPageSelects the lower bound of the range of pages to include in the HTML document. The default value is 1.
toPageSelects the upper bound of the range of pages to include in the HTML document. Per default all pages are included.
embedImagesSpecifies wether or not to embed images in the resulting HTML output. Per default images are embedded.
imageGenerationDirectoryIn the case that images are not embedded (See embedImages) this property specifies the directory into which generated images are written. The directory needs to exist, it is not created. Note that the urls that are created will not take this value into account. By default, the urls that are created contain the image name only so that the images are expected to reside in the same directory as the document. If needed, the url prefix for the generated urls can be changed by the property imageURLPrefix.
imageURLPrefixIn the case that images are not embedded (See embedImages) this property specifies the prefix of the urls of the generated images. As an example consider that an image of the name "12345.png" is created and this property is set to the value "./images/" then the "src" attribute of the generated "img" element would be set to "./images/12345.png".
removeWhitespaceControls whether or not cells should be created for empty strings. Per default whitespace is stripped from the document.
ignoreRowAlignmentWhen set, only those objects that are entirely above or entirely below each other will go in separate rows. When set, the option reduces the amount of rows thereby loosing the horizontal alignment. The topology is not changed so that stacked items remain stacked. Per default row alignment is not ignored.
ignoreColumnAlignmentWhen set, only those objects that are entirely to the left or entirely to the right of each other will go in separate columns. When set, the option reduces the amount of columns thereby loosing the vertical alignment. The topology is not changed so that adjacent items remain adjacent. Per default column alignment is not ignored.
removeBackgroundImagesControls the behavior in case an IMAGEBOX is partially obscured by another element. When set, the image is removed from the resulting document otherwise the handling is as with any other case of overlapping items. By default, background images are removed.
void configureImageDevice ( RuntimeConfigurationPtr  rcPtr,
enum boolean  antialiasFonts,
enum boolean  antialiasShapes,
enum boolean  monochrome,
int  fromPage,
int  toPage,
const char *  fileType,
const char *  filePath,
const char *  fileNamePrefix,
int  resolution 
)

Function to configure the image output

This function is applicable when image output has been selected by a call to the function selectDevice. All arguments to this function are optional (indicated by passing a null value).

Parameters
antialiasFontsConfigures whether or not fonts should be rendered using antialiasing. The default value is true.
antialiasShapesConfigures whether or not shapes should be rendered using antialiasing. The default value is true.
monochromeConfigures whether or not color values should be converted to monochrome output. The default value is true.
fromPageSelects the lower bound of the range of pages to create images for. The default value is 1.
toPageSelects the upper bound of the range of pages to create images for. Per default, images are created for all pages.
fileTypeOne of jpg|png|bmp|gif. The default value is 'jpg'.
filePathPath of the target directory where the images are created. The default value is the value of the environment variable GREOUTPUTDIR or the current working directory of the report engine if GREOUTPUTDIR isn't set. Relative paths are absolutized using GREOUTPUTDIR if that is set.
fileNamePrefixName prefix of the generated files (e.g. setting namePrefix to "Chart" will cause the creation of files called "Chart0001","Chart0002",..
resolutionControls the resolution in DPI used for creating the images. If the image is later viewed unscaled on a device with the specified resolution, all items will have their correct metric length. Beware that high values may require enormous amounts of memory and the resulting files may become very large. The formula for calculating the memory consumption in byte is resolution_in_dpi_x*page_width_in_inches*resolution_in_dpi_y*page_height_in_inches*3byte for a color image. For a page of format "letter" at 96 DPI we therefore get 96DPI*8.5"*96DPI*11"*3byte=2.6 MB. At 300 DPI this is 25 MB (color) and 8 MB (grayscale). The renderer currently requires the entire page to be in memory. The default value is 96.
void configureLabelOutput ( RuntimeConfigurationPtr  rcPtr,
const char *  paperWidth,
const char *  paperHeight,
const char *  labelWidth,
const char *  labelHeight,
int  labelsPerRow,
int  labelsPerColumn 
)

Function that configures the physical layout of a label page

This function is applicable when selecting "label" as mapping option by calling the function selectLogicalPageMapping. The function configures the physical layout by specifying the paper dimensions, the physical label size and the n x m layout. The physical margins (distance between page border and label) are specified by calling setPaperMargins.

Parameters
paperWidthwidth of the page (e.g. a4width). Specifying this value is mandatory.
paperHeightheight of the page (e.g. a4length). Specifying this value is mandatory.
labelWidthPhysical width of a label (e.g. 99.1mm) The value specified here should be the same or larger than the width in the .4rp file. The value is optional (indicated by passing null). In this case the width specified in the .4rp file is used.
labelHeightPhysical height of a label (e.g. 42.3mm) The value specified here should be the same or larger than the height in the .4rp file. The value is optional (indicated by passing null). In this case the height specified in the .4rp file is used.
labelsPerRowthe number of labels across. Specifying this value is mandatory.
labelsPerColumnthe number of labels down. Specifying this value is mandatory.
void configureLocalization ( RuntimeConfigurationPtr  rcPtr,
const char *  charSet,
const char *  resourcePath,
const char *  numberFormat,
const char *  dateFormat 
)

Function that configures the localization for the current report.

The function is not applicable for callback localization

Parameters
charSetA string character set name that specifies the encoding of the translation files (.str and .42s files). By default the system encoding is used.
resourcePathA colon or semicolon delimited (Windows) list of directories specifying the search path for compiled translation files (.42s). By default the value of the environment variable FGLRESOURCEPATH is taken.
numberFormatA formatting string to be used for number formatting. The format is compatible with the format of the 4GL DBFORMAT environment variable. By default the value of the environment variable DBFORMAT is taken.
dateFormatA formatting string to be used for date formatting. The format is compatible with the format of the 4GL DBDATE environment variable. By default the value of the environment variable DBDATE is taken.
void configureMultipageOutput ( RuntimeConfigurationPtr  rcPtr,
int  pageExponent,
int  isoNumber,
enum boolean  portrait 
)

Function to configure the multi page output for ISO or JIS formats

This function is applicable for ISO or JIS formats and enables the printing of several logical pages per physical page. The number of pages per page is always a power of 2.

Parameters
pageExponentSpecifies the number of pages to print. The actual number of pages is calculated by the formula count=2^pageExponent.
isoNumberSpecifies the ISO number (e.g. 4 -> ISOA4) This parameter is optional (indicated by passing an null value). In case that no value is specified, the page size of the logical page is taken from the .4rp file (if specified).
portraitSpecifies if the page is in portrait orientation or not (landscape). This parameter is optional (indicated by passing an null value). In case that no value is specified, the value of the logical page is taken from the .4rp file or the value specified in a call to configurePageSize.
void configureOORTFDevice ( RuntimeConfigurationPtr  rcPtr,
int  fromPage,
int  toPage,
int  imagesResolution,
enum RTFImagesFormatEnum  imagesFormat 
)

Function to configure RTF output for Open Office

This function is applicable when RTF output has been selected by a call to the function selectDevice. All arguments to this function are optional (indicated by passing a null value). In case that the RTF document should be written to a file, the general function setOutputFileName and selectPreview (4GL only) are available for this purpose.

Parameters
fromPageSelects the lower bound of the range of pages to include in the RTF document. The default value is 1.
toPageSelects the upper bound of the range of pages to include in the RTF document. Per default all pages are included.
imagesResolutionSpecifies the resolution in DPI of embedded images. Besides ImageBoxes also content from BarCodeBoxes, business charts and HTMLBoxes are embedded as images. The default value is 300.
imagesFormatOne of :"png", "jpg". Controls the format of images embedded in the RTF document. Select jpeg for compactness, png for lossless compression. The default value is 'png'.
void configurePageSize ( RuntimeConfigurationPtr  rcPtr,
const char *  pageWidth,
const char *  pageHeight 
)

Function to configure the page size

The page dimensions of the report are read from the .4rp file. This function is used to override the values found there or set the values in the case of compatibilty reports where no .4rp file is specified.

Parameters
pageWidthwidth of the page (e.g. a4width)
pageHeightheight of the page (e.g. a4length)
void configurePDFDevice ( RuntimeConfigurationPtr  rcPtr,
const char *  fontDirectory,
enum boolean  antialiasFonts,
enum boolean  antialiasShapes,
enum boolean  monochrome,
int  fromPage,
int  toPage 
)

Function to configure the PDF output

This function is applicable when PDF output has been selected by a call to the function selectDevice. All arguments to this function are optional (indicated by passing a null value). In case that the PDF document should be written to a file, the general function setOutputFileName and selectPreview (4GL only) are available for this purpose.

Parameters
fontDirectoryAbsolute path to the directory containg the font files #+
antialiasFontsConfigures whether or not fonts should be rendered using antialiasing. The default value is false.
antialiasShapesConfigures whether or not shapes should be rendered using antialiasing. The default value is false.
monochromeConfigures whether or not color values should be converted to monochrome output. The default value is false.
fromPageSelects the lower bound of the range of pages to include in the PDF document. The default value is 1.
toPageSelects the upper bound of the range of pages to include in the PDF document. Per default all pages are included.
void configurePDFFontEmbedding ( RuntimeConfigurationPtr  rcPtr,
enum boolean  preferUnicodeEncoding 
)

Function to configure the font embedding in PDF output

This function is applicable when PDF output has been selected by a call to the function selectDevice. The argument to this function is optional (indicated by passing a null value).

Parameters
preferUnicodeEncodingSpecified to encode characters in unicode whenever possible. This option should be set if non latin characters are used in the document. Unsetting the option improves processing speed and yields slightly smaller documents. By default the parameter has a value of TRUE.
void configureRTFDevice ( RuntimeConfigurationPtr  rcPtr,
int  fromPage,
int  toPage,
int  imagesResolution,
enum RTFImagesFormatEnum  imagesFormat 
)

Function to configure RTF output

This function is applicable when RTF output has been selected by a call to the function selectDevice. All arguments to this function are optional (indicated by passing a null value). In case that the RTF document should be written to a file, the general function setOutputFileName and selectPreview (4GL only) are available for this purpose.

Parameters
fromPageSelects the lower bound of the range of pages to include in the RTF document. The default value is 1.
toPageSelects the upper bound of the range of pages to include in the RTF document. Per default all pages are included.
imagesResolutionSpecifies the maximum resolution in DPI of embedded images. Besides ImageBoxes also content from BarCodeBoxes, business charts and HTMLBoxes are embedded as images.
imagesFormatOne of :"png", "jpg". Controls the format of images embedded in the RTF document. Select jpeg for compactness, png for lossless compression.
void configureSVGDevice ( RuntimeConfigurationPtr  rcPtr,
enum boolean  antialiasFonts,
enum boolean  antialiasShapes,
enum boolean  embedFonts,
enum SVGCharsetToEmbedEnum  charsetToEmbed 
)

Function to configure the SVG output

This function is applicable when SVG output has been selected by a call to the function selectDevice. All arguments to this function are optional (indicated by passing a null value). In case that the SVG document should be written to a file, the general function setOutputFileName and selectPreview (4GL only) are available for this purpose.

Parameters
antialiasFontsConfigures whether or not fonts should be rendered using antialiasing. The default value is false.
antialiasShapesConfigures whether or not shapes should be rendered using antialiasing. The default value is false.
embedFontsControls whether or not fonts are embedded within the document. The default value is true.
charsetToEmbedSVG offers the possibility to embed fonts within the document. Documents with embedded fonts are slightly larger but they offer the high advantage of exact reproduction. Ideally one would embed exactly those characters that were used throughout the document but that would require reading the entire document before creating any SVG output. A solution, that does no compromise streaming is the one provided by this attribute. The characters in the specified character set are embedded not requiring all of them to have been used. A value of "DEFAULT" embeds all characters from the code pages iso-8859-1 through iso-8859-16 (about 700 characters). A value of "ISO-8859-15" embeds all characters from the named code page (about 200 characters). Finally a value of "ALL" embeds all characters available in the selected fonts. This option should only be used when Asian characters are needed since the size of the glyph definitions will significantly grow the document size.
void configureSVGPreview ( RuntimeConfigurationPtr  rcPtr,
enum SVGPreviewTypeEnum  type 
)

Function to select SVG preview mode

Available only for the device SVG when previewing is selected , this function allows to select how the document is handled by the SVG previewer. There are four possible options: The option "Preview" makes the previewer visible and shows the document in a tab folder. The second option "ShowPrintDialog" pops up the print dialog allowing the user to select and configure a printer. The document is printed in the background and the previewer main window is not shown. The third option "PrintOnDefaultPrinter" prints the report silently on the default printer. The previewer main window is not shown. The fourth option "PrintOnNamedPrinter" prints the report silently on the a named printer. The previewer main window is not shown.

Preview: The report is shown in a folder tab of the main preview window.

ShowPrintDialog: This option pops up the system print dialog allowing the user to select and configure a printer. If confirmed, the document is printed in the background.

PrintOnDefaultPrinter: This option prints the report silently on the default printer.

PrintOnNamedPrinter: This option prints the report silently to the named default printer. The printer is named by a call to setSVGPrinterName() and the page range can be set by calling setSVGPageRange(). If the previewer is on Windows, then the paper source can be selected with the function setSVGPaperSource()

Parameters
type"Preview", "ShowPrintDialog", "PrintOnDefaultPrinter" or "PrintOnNamedPrinter"
void configureXLSDevice ( RuntimeConfigurationPtr  rcPtr,
int  fromPage,
int  toPage,
enum boolean  removeWhitespace,
enum boolean  ignoreRowAlignment,
enum boolean  ignoreColumnAlignment,
enum boolean  removeBackgroundImages,
enum boolean  mergePages 
)

Function to configure the XLS (Excel) output

This function is applicable when XLS output has been selected by a call to the function selectDevice. All arguments to this function are optional (indicated by passing a null value). In case that the XLS document should be written to a file, the general function setOutputFileName and selectPreview (4GL only) are available for this purpose.

Parameters
fromPageSelects the lower bound of the range of pages to include in the XLS document. The default value is 1.
toPageSelects the upper bound of the range of pages to include in the XLS document. Per default all pages are included.
removeWhitespaceControls whether or not cells should be created for empty strings. Per default whitespace is stripped from the document.
ignoreRowAlignmentWhen set, only those objects that are entirely above or entirely below each other will go in separate rows. When set, the option reduces the amount of rows thereby loosing the horizontal alignment. The topology is not changed so that stacked items remain stacked. Per default row alignment is ignored.
ignoreColumnAlignmentWhen set, only those objects that are entirely to the left or entirely to the right of each other will go in separate columns. When set, the option reduces the amount of columns thereby loosing the vertical alignment. The topology is not changed so that adjacent items remain adjacent. Per default column alignment is ignored.
removeBackgroundImagesControls the behavior in case an IMAGEBOX is partially obscured by another element. When set, the image is removed from the resulting document otherwise the handling is as with any other case of overlapping items. By default, background images are removed.
mergePagesControls the behavior in case that the report has more than one page. By default a separate sheet is created per page. Setting this parameter causes pages to be merged thereby creating a single result sheet unless the sheet has more that 65536 rows in which case the exceeding rows spill over into extra sheets.
void configureXLSXDevice ( RuntimeConfigurationPtr  rcPtr,
int  fromPage,
int  toPage,
enum boolean  removeWhitespace,
enum boolean  ignoreRowAlignment,
enum boolean  ignoreColumnAlignment,
enum boolean  removeBackgroundImages,
enum boolean  mergePages 
)

Function to configure the XLSX (Excel) output

This function is applicable when XLSX output has been selected by a call to the function selectDevice. All arguments to this function are optional (indicated by passing a null value). In case that the XLSX document should be written to a file, the general function setOutputFileName and selectPreview (4GL only) are available for this purpose.

Parameters
fromPageSelects the lower bound of the range of pages to include in the XLS document. The default value is 1.
toPageSelects the upper bound of the range of pages to include in the XLS document. Per default all pages are included.
removeWhitespaceControls whether or not cells should be created for empty strings. Per default whitespace is stripped from the document.
ignoreRowAlignmentWhen set, only those objects that are entirely above or entirely below each other will go in separate rows. When set, the option reduces the amount of rows thereby loosing the horizontal alignment. The topology is not changed so that stacked items remain stacked. Per default row alignment is ignored.
ignoreColumnAlignmentWhen set, only those objects that are entirely to the left or entirely to the right of each other will go in separate columns. When set, the option reduces the amount of columns thereby loosing the vertical alignment. The topology is not changed so that adjacent items remain adjacent. Per default column alignment is ignored.
removeBackgroundImagesControls the behavior in case an IMAGEBOX is partially obscured by another element. When set, the image is removed from the resulting document otherwise the handling is as with any other case of overlapping items. By default, background images are removed.
mergePagesControls the behavior in case that the report has more than one page. By default a separate sheet is created per page. Setting this parameter causes pages to be merged thereby creating a single result sheet.
char* getPIAttributes ( RuntimeConfigurationPtr  rcPtr)

result needs to be free'd

void markOverfullBoxesInDocument ( RuntimeConfigurationPtr  rcPtr,
enum boolean  value 
)

Function that causes overfull boxes to be highlighted for debugging purposes

When set, overfull objects are colorized with a pink semi transparent color.

Parameters
valueIn case that the variable GREDEBUG is set the default value is true otherwise it is false.
void selectDevice ( RuntimeConfigurationPtr  rcPtr,
enum outputDeviceEnum  device 
)

Function to select the output device

Select a different output device. This changes the current settings. The following device specific configuration functions are available:

PDF:configurePDFDevice, setPDFJPEGImageEncoding, setPDFImageResolution, configurePDFFontEmbedding.

RTF:configureRTFDevice, setRTFMemoryThreshold.

OORTF:configureOORTFDevice.

XLS:configureXLSDevice, setXLSMergeCells.

XLSX:configureXLSXDevice, setXLSXMergeCells.

HTML:configureHTMLDevice

Image:configureImageDevice, setImageUsePageNamesAsFileNames, setImageShrinkImagesToPageContent.

SVG:configureSVGDevice, setSVGCompression, setSVGCopies, setSVGPageRange, setSVGPaperSource, configureSVGPreview, setSVGPrinterName, setSVGOrientationRequested, setSVGSheetCollate.

Printer:setPrinterName, setPrinterChromaticity, setPrinterCopies, setPrinterDestinationUrl, setPrinterFidelity, setPrinterJobImpressions, setPrinterJobMediaSheets, setPrinterJobName, setPrinterJobPriority, setPrinterJobSheets, setPrinterMediaSizeName, setPrinterMediaTray, setPrinterMediaName, setPrinterNumberUp, setPrinterOrientationRequested, setPrinterPageRanges, setPrinterResolution, setPrinterRequestingUserName, setPrinterPrintQuality, setPrinterSheetCollate, setPrinterSides, setPrinterWriteToFile.

Parameters
deviceOne of :"Printer", "Postscript", "PDF", "RTF", "OORTF", "Image", "SVG", "XLS", "XLSX", "HTML" #+
void selectLogicalPageMapping ( RuntimeConfigurationPtr  rcPtr,
enum logicalPageMappingEnum  mapping 
)

Function that configures the mapping from logical pages to physical pages

The report engine distinguishes between logical pages (pages dimensions in the .4rp file) and the physical dimensions of the pages in the device. Currently the following mapping options exist

oneToOne: This is the default value. In this case the logical and physical pages are identical.

labels: For label printing it is advisable to design one label rather than creating a fixed n x m layout. Such a layout can be printed on an arbitrary physical n x m layout as long as the physical labels have at least the size of the logical labels. The physical dimensions of the layout must be configured using the function configureLabelOutput and setPaperMargins. The margins within a label can be configured by calling setPageMargins.

multipage: For ISO and JIS sized pages it is possible to print several pages per page. This is achived by setting the mapping to this value and calling the function configureMultipageOutput to configure the required number of pages.

Parameters
mappingone of : oneToOne|labels|multipage
void setAuthor ( RuntimeConfigurationPtr  rcPtr,
const char *  author 
)

Function to set the report author meta data value

If the target file format supports meta data then the value is inserted into the target document. The function is intended to be used for compatibility reports. For regular reports the value should be set using the designer to set the corresponding "author" property on the report root. Calling this function to set the value supersedes that value specified from the '.4rp' template.

Parameters
authorAuthor of the report.
void setAutoformatType ( RuntimeConfigurationPtr  rcPtr,
enum autoformatTypeEnum  type 
)

Function that set auto formatting type in case that no .4rp template is specified.

By default a report in rendered in compatibility mode if no .4rp is specified. This function provides additional rendering options.

Parameters
typeOne of :"COMPATIBILITY", "FLAT LIST", "NEW LIST"
void setBrowserDocumentDirectory ( RuntimeConfigurationPtr  rcPtr,
const char *  directory 
)

Function to configure the document directory for browser viewing

This function is applicable when "Browser" output has been selected by a call to the function selectDevice. When set, the function causes the document to be written to the specified directory in a form suitable for viewing by a web browser. The specified directory needs to be reachable via http. Please note that the directory should be empty or non existent in which case it will be created during report generation.

Parameters
directoryA string specifying the directory in which the document is created.
void setBrowserDocumentDirectoryURL ( RuntimeConfigurationPtr  rcPtr,
const char *  directory 
)

Function to configure the URL by which the document directory for browser viewing will be visible from a web server

This function is applicable when "Browser" output has been selected by a call to the function selectDevice.

Parameters
directoryA URL by which the document directory can be retrieved from the web server.
void setBrowserFontDirectory ( RuntimeConfigurationPtr  rcPtr,
const char *  directory 
)

Function to configure the font directory for browser viewing

This function is applicable when "Browser" output has been selected by a call to the function selectDevice. It is advisable to choose a directory that is shared among different documents so that both the web server and the local browser can cache fonts. The specified directory needs to be reachable via http. Please note that it must be possible to refer from document directory to this directory by means of a relative path so that the two directories may not for example be on separate drives.

Parameters
directoryA string specifying the directory in which web fonts will be placed.
void setBrowserFontDirectoryURL ( RuntimeConfigurationPtr  rcPtr,
const char *  directory 
)

Function to configure the URL by which the font directory for browser viewing will be visible from a web server

This function is applicable when "Browser" output has been selected by a call to the function selectDevice.

Parameters
directoryA URL by which the fonts directory can be retrieved from the web server.
void setBrowserFontFileFormat ( RuntimeConfigurationPtr  rcPtr,
enum BrowserFontFileFormatEnum  format 
)

Function to configure the font file format for browser viewing

This function is applicable when "Browser" output has been selected by a call to the function selectDevice. The default font type is "woff" which works for most browser supporting web fonts.

Parameters
formatone of : woff|eot|ttf
void setCallbackLocalization ( RuntimeConfigurationPtr  rcPtr,
enum boolean  value 
)

Function that configures the report engine to call the function report_getFieldCaption(matchName,fieldName) for localization

Per default the field titles are retrieved from localization files created by the command "fglmkstr".

Parameters
valueIf set, the engine will call the function report_getFieldCaption for each field to retrieve the field caption.
void setCreator ( RuntimeConfigurationPtr  rcPtr,
const char *  creator 
)

Function to set the report creator meta data value

If the target file format supports meta data then the value is inserted into the target document. The function is intended to be used for compatibility reports. For regular reports the value should be set using the designer to set the corresponding "creator" property on the report root. Calling this function to set the value supersedes that value specified from the '.4rp' template.

Parameters
creatorCreator of the report.
void setDistributedRequestingUserName ( RuntimeConfigurationPtr  rcPtr,
const char *  requestingUserName 
)

Function to specify end user's name for the purpose of identifying log entries in the case of distributed processing.

Specifies the end user's name who submitted the job. A requesting user name is an arbitrary string defined by the client. Default: "not set"

Parameters
requestingUserNamethe user name
void setEnvironment ( RuntimeConfigurationPtr  rcPtr,
const char *  values 
)

Function that specifies variable values in the private environment of the report

Can be used to specify the value of environment variables like GREOUTPUTDIR or user defined variables for the purpose of using the values in calls to the RTL function Runtime.getEnvironmentVariable().

Parameters
valuesAttribute set containing the values
void setImageShrinkImagesToPageContent ( RuntimeConfigurationPtr  rcPtr,
enum boolean  value 
)

Function to configure image cropping

Sets whether the images produced are cropped to the page content (size of the page box) or have full page size. The default value is false.

Parameters
valuetrue or false
void setImageUsePageNamesAsFileNames ( RuntimeConfigurationPtr  rcPtr,
enum boolean  value 
)

Function to configure image file name generation

Sets whether the page names ("name" attribute) in the document should be used as image file names. In the case that a name is not unique a disambiguation number is appended. In the case that a page does not set the "name" attribute the default naming scheme explained in fgl_reportConfigureImageDevice is used. The default value is false.

Parameters
valuetrue or false
void setKeywords ( RuntimeConfigurationPtr  rcPtr,
const char *  keywords 
)

Function to set the report keywords meta data value

If the target file format supports meta data then the value is inserted into the target document. Typically this is a white space separated list of key words. The function is intended to be used for compatibility reports. For regular reports the value should be set using the designer to set the corresponding "keywords" property on the report root. Calling this function to set the value supersedes that value specified from the '.4rp' template.

Parameters
keywordsKeywords to classify the report.
void setOutputFileName ( RuntimeConfigurationPtr  rcPtr,
const char *  fileName 
)

Function to configure the file location of device output

This function is not applicable when preview has been selected by a call to selectPreview (4GL only). The function does not set the file name for image output since images are not output into a single file. In this case the "imagePrefix" parameter in a call to the function configureImageDevice is available for setting the file names.

Parameters
fileNamePathname of the file. The name may contain a device specific suffix. If no suffix is specified then a device specific suffix is appended.
void setPageMargins ( RuntimeConfigurationPtr  rcPtr,
const char *  topMargin,
const char *  bottomMargin,
const char *  leftMargin,
const char *  rightMargin 
)

Function that configures the logical margins of a report

The logical margins of the report are read from the .4rp file. This function is used to override the values found there or set the values in the case of compatibilty reports where no .4rp file is specified. In case of label printing (see selectLogicalPageMapping) this function specifies the margins within a label. Similarly, when multi page output is selected (see selectLogicalPageMapping) the values specify the margins of the logical pages which can be smaller than the physical margins since the required width is not limited by device limitations but by aesthetic aspects only.

Parameters
topMargintop margin value of the logical page (e.g. 0.5cm). The value is optional (indicated by passing null). In this case the width specified in the .4rp file is used.
bottomMarginbottom margin value of the logical page (e.g. 0.5cm). The value is optional (indicated by passing null). In this case the width specified in the .4rp file is used.
leftMarginleft margin value of the logical page (e.g. 0.5cm). The value is optional (indicated by passing null). In this case the width specified in the .4rp file is used.
rightMarginright margin value of the logical page (e.g. 0.5cm). The value is optional (indicated by passing null). In this case the width specified in the .4rp file is used.
void setPageSwappingThreshold ( RuntimeConfigurationPtr  rcPtr,
int  value 
)

Function that set the threshold for page-to-disk swapping for prevention of memory exhaustion on very large documents using "Page N of M"

The function specifies the maximum number of pages that may be held in main memory. When the value is exceeded, pages are swapped to the disk. This parameter is only needed for very large report that contain references to the total number of pages. Alternatively it is possible to grow the amount of memory that the Java JVM may allocate by setting the parameter -Xmx (e.g. "java -Xmx512m" for 512 MB) in the script $GREDIR/bin/greportwriter[.bat]. By default the value is not set so that pages are never swapped to disk.

Parameters
valueA positive integer greater than 0 that specifies the maximum number of pages that may be held in main memory.
void setPaperMargins ( RuntimeConfigurationPtr  rcPtr,
const char *  topMargin,
const char *  bottomMargin,
const char *  leftMargin,
const char *  rightMargin 
)

Function that configures the physical margins of a report

The physical margins of the report can be set by this function for the case that either label printing or multi page output has been selected by a call to selectLogicalPageMapping.

Parameters
topMargintop margin value of the physical page (e.g. 0.5cm)
bottomMarginbottom margin value of the physical page (e.g. 0.5cm)
leftMarginleft margin value of the physical page (e.g. 0.5cm)
rightMarginright margin value of the physical page (e.g. 0.5cm)
void setPDFImageResolution ( RuntimeConfigurationPtr  rcPtr,
int  imagesResolution 
)

Function to configure the resolution of embedded images in PDF output

This function is applicable when PDF output has been selected by a call to the function selectDevice.

Parameters
imagesResolutionSpecifies the maximum resolution in DPI of embedded images.
void setPDFJPEGImageEncoding ( RuntimeConfigurationPtr  rcPtr,
enum boolean  encodeImagesAsJPEG,
float  jpegQuality 
)

Function to configure the encoding method of embedded images in PDF output

This function is applicable when PDF output has been selected by a call to the function selectDevice. All arguments to this function are optional (indicated by passing a null value).

Parameters
encodeImagesAsJPEGSpecifies images to be encoded in JPEG format. The default value is false.
jpegQualitySets the compression quality to a value between 0 and 1. By default a value of 1 is used (highest quality).
void setPrinterChromaticity ( RuntimeConfigurationPtr  rcPtr,
const char *  chromaticity 
)

Function to control color selection of the printer

Controls how the print data should be generated or processed. It does not confine the printer selection to printers with the specified capability. Default value is color. Setting this option reduces the set of usable printers to those matching it.

Parameters
chromaticityone of : monochrome|color
void setPrinterCopies ( RuntimeConfigurationPtr  rcPtr,
int  copies 
)

Function to specify the number of copies to be printed.

Specifies the number of copies to be printed. Default value: 1 Setting this option reduces the set of usable printers to those matching it.

Parameters
copiesthe number of copies to print
void setPrinterDestinationUrl ( RuntimeConfigurationPtr  rcPtr,
const char *  destination 
)

Function to specify an alternate destination for the spooled printer formatted data.

A URL indicating an alternate destination for the spooled printer formatted data. Some print services will not support the notion of a destination other than the printer device and so will not support this attribute. A common use for this attribute will be applications which want to redirect output to a local disk file: e.g. "file:out.prn". A more platform independent way is to set the setPrinterprinterName to "stdout" so that postscript is written to stdout or to specify the setPrinterWriteToFile attribute which causes postscript to be written to the specified file. Another alternative may be the usage of the selectDevice to generate a PDF file . Default: "not set" Setting this option reduces the set of usable printers to those matching it.

Parameters
destinationthe destination URL
void setPrinterFidelity ( RuntimeConfigurationPtr  rcPtr,
enum boolean  fidelity 
)

Function to select printer high fidelity mode

When set, all attributes of the printer have to meet the requested values, otherwise the printout will fail. When set to false, a reasonable attempt to print the document is acceptable. Default value is false. Setting this option reduces the set of usable printers to those matching it.

Parameters
fidelitytrue or false
void setPrinterJobImpressions ( RuntimeConfigurationPtr  rcPtr,
int  jobImpressions 
)

Function to specify the total size in number of impressions.

Specifies the total size in number of impressions of the document. An "impression" is the image (possibly many print stream pages in different configurations) imposed onto a single media page. The jobImpressions attribute describes the size of the job. This attribute is not intended to be a counter; it is intended to be useful routing and scheduling information. The printer may try to compute the attribute's value if it is not supplied. Even if a value is supplied, the printer may choose to change the value if the printer is able to compute a value that is more accurate than the supplied value. The printer may be able to determine the correct value for the jobImpressions attribute right at job submission or at a later time. Unlike the setPrinterJobMediaSheets function, the value must not include the multiplicative factors contributed by the number of copies, specified by the setPrinterCopies function. Setting this option reduces the set of usable printers to those matching it.

Parameters
jobImpressionsnumber of jobs
void setPrinterJobMediaSheets ( RuntimeConfigurationPtr  rcPtr,
int  jobMediaSheets 
)

Function to specify the total number of media sheets.

Specifies the total number of media sheets to be produced for this job. The jobMediaSheets attribute describes the size of the job. This attribute is not intended to be a counter; it is intended to be useful routing and scheduling information. The printer may try to compute the attribute's value if it is not supplied. Even if a value is supplied, the printer may choose to change the value if the printer is able to compute a value that is more accurate than the supplied value. The printer may be able to determine the correct value for the jobMediaSheets attribute right at job submission or at a later time. The value must include the multiplicative factors contributed by the number of copies, specified by the setPrintercopies function. Default value: not set Setting this option reduces the set of usable printers to those matching it.

Parameters
jobMediaSheetsnumber of sheets
void setPrinterJobName ( RuntimeConfigurationPtr  rcPtr,
const char *  jobName 
)

Function to specify a name for the job.

Name of the print job useful for tracking the job. The value does not have to be unique. Default: "not set" Setting this option reduces the set of usable printers to those matching it.

Parameters
jobNamename of the job
void setPrinterJobPriority ( RuntimeConfigurationPtr  rcPtr,
int  jobPriority 
)

Function to specify a priority for the job.

If supplied, the value specify a priority for scheduling the job. A higher value specify a higher priority. The value 1 indicates the lowest possible priority. The value 100 indicates the highest possible priority. Among those jobs that are ready to print, a printer must print all jobs with a priority value of n before printing those with a priority value of n-1 for all n. Default: "not set" Setting this option reduces the set of usable printers to those matching it.

Parameters
jobPrioritypriority of the job
void setPrinterJobSheets ( RuntimeConfigurationPtr  rcPtr,
const char *  jobSheets 
)

Function to control job sheet printing

Controls if job start and end sheets are to be printed. Default: none Setting this option reduces the set of usable printers to those matching it.

Parameters
jobSheetsone of : none|standard
void setPrinterMediaName ( RuntimeConfigurationPtr  rcPtr,
const char *  mediaName 
)

Function to select the type of media to use

Controls the type of media to choose. This function and the functions setPrinterSizeName and setPrintermediaTray are mutually exclusive. Default: "not set" Setting this option reduces the set of usable printers to those matching it.

Parameters
mediaNameone of : iso-a4-transparent|iso-a4-white|na-letter-transparent |na-letter-white or any value returned by PrinterInfo
void setPrinterMediaSizeName ( RuntimeConfigurationPtr  rcPtr,
const char *  mediaSizeName 
)

Function to select the media size to be used

Selects the media size to be used. Normally this does not need to be specified, as the program will automatically select the smallest media onto which the current document can be printed without clipping or scaling. This function and the functions setPrintermediaTray and setPrintermediaName are mutually exclusive. Default value not set(is automatically selected). Setting this option reduces the set of usable printers to those matching it.

Parameters
mediaSizeNameone of : a|b|c|d|e|executive|folio|invoice |iso-a0|iso-a1|iso-a2|iso-a3|iso-a4|iso-a5|iso-a6|iso-a7|iso-a8|iso-a10|iso-b0 |iso-b1|iso-b2|iso-b3|iso-b4|iso-b5|iso-b6|iso-b7|iso-b8|iso-b10|iso-c0|iso-c1 |iso-c2|iso-c3|iso-c4|iso-c5|iso-c6|iso-designated-long|iso-italian-envelope |iso-oufuko-postcard|jis-b0|jis-b1|jis-b2|jis-b3|jis-b4|jis-b5|jis-b6|jis-a7 |jis-b8|jis-b10|ledger|monarch-envelope|na-10x13-envelope|na-10x14-envelope |na-10x15-envelope|na-5x7|na-6x9-envelope|na-8x10|na-9x11-envelope |na-9x12-envelope|na-legal|na-letter|na-number-10-envelope|na-number-11-envelope |na-number-12-envelope|na-number-14-envelope|na-number-9-envelope |personal-envelope|quarto|tabloid
void setPrinterMediaTray ( RuntimeConfigurationPtr  rcPtr,
const char *  mediaTray 
)

Function to select the tray of the printer

Controls what tray to take the media from. This function and the functions setPrintermediaTray and setPrintermediaName are mutually exclusive. Setting this option reduces the set of usable printers to those matching it.

Parameters
mediaTrayone of : bottom|envelope|large-capacity|main|manual|middle|side|top
void setPrinterName ( RuntimeConfigurationPtr  rcPtr,
const char *  printerName 
)

Function to select a specific printer by name

Name of requested printer as listed by utility PrinterInfo as "SERVICE" or a PJL printer host name prefixed by the string "pjl:". A special meaning is attached to the name "stdout". If this value is specified, then postscript is written to stdout. Default value is "Not Set". Setting this option reduces the set of usable printers to those matching it.

Parameters
printerNamethe name of the printer
void setPrinterNumberUp ( RuntimeConfigurationPtr  rcPtr,
int  numberUp 
)

Function to specify a name for the job.

Specifies the number of print stream pages to impose upon a single side of an instance of selected medium. That is, if the numberUp value is n, the printer must place n print stream pages on a single side of an instance of the selected medium. To accomplish this, the printer may add some sort of translation, scaling or rotation. NOTE: since this feature is available only on a few printers it is advisable to perform the necessary transformations using this API Default: "not set" Setting this option reduces the set of usable printers to those matching it.

Parameters
numberUpnumber of pages
void setPrinterOrientationRequested ( RuntimeConfigurationPtr  rcPtr,
const char *  orientationRequested 
)

Function to control the paper orientation

Controls the paper orientation. Normally this value should not be set. The value is set internally by analyzing the page's width and height values. However, in the case of matrix or label printers which can be loaded with paper of various dimensions (without the printer or the driver being aware of the current format), the value should be set to "Portrait" for landscape reports when the printer contains landscape paper. Default: not set Setting this option reduces the set of usable printers to those matching it.

Parameters
orientationRequestedone of : landscape|portrait|reverse-landscape|reverse-portrait
void setPrinterPageRanges ( RuntimeConfigurationPtr  rcPtr,
const char *  pageRanges 
)

Function to specify the ranges of pages to print.

Specifies the ranges of print stream pages that the printer uses for each copy of the document printed. Nothing is printed for any pages identified that do not exist in the document. Default: "not set" (everything is printed) Setting this option reduces the set of usable printers to those matching it.

Parameters
pageRangespage ranges following the syntax [1-9][0-9]*-[1-9][0-9]*(,[1-9][0-9]*-[1-9][0-9]*)*
void setPrinterPJLVariables ( RuntimeConfigurationPtr  rcPtr,
const char *  values 
)

Function that specifies PJL variables to be used to configure a PJL printer

To be used to specify the value of PJL variables as listed by the PrinterInfo command. Please not that string values (denoted as "QUOTED STRING") need to be quoted using double quotes.

Parameters
valuesAttribute set containing the key/value pairs.
void setPrinterPrintQuality ( RuntimeConfigurationPtr  rcPtr,
const char *  printQuality 
)

Function to control the quality used by the printer

Specifies the print quality used by the printer. Default: not set Setting this option reduces the set of usable printers to those matching it.

Parameters
printQualityone of : draft|high|normal
void setPrinterRequestingUserName ( RuntimeConfigurationPtr  rcPtr,
const char *  requestingUserName 
)

Function to specify end user's name.

Specifies the end user's name who submitted the print job. A requesting user name is an arbitrary string defined by the client. The printer does not put the client-specific requestingUserName attribute into the print job's attribute set; rather, the printer puts in a jobOriginatingUserName attribute. This means that services which support specifying a username with this attribute should also report a jobOriginatingUserName in the job's attribute set. Note that many print services may have a way to independently authenticate the user name, and so may state support for a requesting user name, but in practice will then report the user name authenticated by the service rather than that specified by this attribute. Default: "not set" Setting this option reduces the set of usable printers to those matching it.

Parameters
requestingUserNamethe user name
void setPrinterResolution ( RuntimeConfigurationPtr  rcPtr,
const char *  resolution 
)

Function to specify an exact resolution.

Specifies an exact resolution supported by a printer or to be used for the job. This attribute assumes that printers have a small set of device resolutions at which they can operate rather than a continuum. The resolution is specified in form of a comma separated list of two integers and a unit identifier ("dpi" or "dpcm"). The integers specify x-resolution and y-resolution. It is possible to omit y-resolution in which case it is assumed to have the same value as x-resolution. It is further possible to omit the unit identifier in which case "dpi" is assumed. Default: "not set" Setting this option reduces the set of usable printers to those matching it.

Parameters
resolutionthe resolution of the printer in DPI or DPCM
void setPrinterSheetCollate ( RuntimeConfigurationPtr  rcPtr,
const char *  sheetCollate 
)

Function to control the collation of multiple copies

Specifies whether or not the pages of the document are to be in sequence, when multiple copies of the document are specified by the setPrinterCopies function. When sheetCollate is "collated", each copy of the document is printed with the pages in sequence. When sheetCollate is "uncollated", each page is printed a number of times equal to the value of the setPrinterCopies attribute in succession. For example, suppose a document produces two pages as output, setPrinterCopies is 6, and sheetCollate is "uncollated"; in this case six copies of the first page are printed followed by six copies of the second page. NOTE: It is discouraged to set sheetCollate to "collated" since it requires caching the entire document which is undesirable for large documents. If necessary, produce the document the required number of times. Default: uncollated Setting this option reduces the set of usable printers to those matching it.

Parameters
sheetCollateone of : collated|uncollated
void setPrinterSides ( RuntimeConfigurationPtr  rcPtr,
const char *  sides 
)

Function to specify the mapping of pages on the physical media.

Specifies how print-stream pages are to be imposed upon the sides of and instance of a selected medium, i.e., an impression.

one-sided: Imposes each consecutive print-stream page upon the same side of consecutive media sheets.

two-sided-short-edge: Imposes each consecutive pair of print stream pages upon front and back sides of consecutive media sheets, such that the orientation of each pair of print stream pages on the medium would be correct as if for binding along the short edge.

two-sided-long-edge: Imposes each consecutive pair of print stream pages upon front and back sides of consecutive media sheets, such that the orientation of each pair of print stream pages on the medium would be correct as if for binding along the long edge.

Default value: not set Setting this option reduces the set of usable printers to those matching it.

Parameters
sidesOne of: one-sided|two-sided-short-edge|two-sided-long-edge
void setPrinterWriteToFile ( RuntimeConfigurationPtr  rcPtr,
const char *  file 
)

Function to specify a file where the report is written in postscript

A file name specifying a location where the report output is written to in postscript format. If this attribute is set, all other IPP attribute values are ignored. Default: "not set" Setting this option reduces the set of usable printers to those matching it. The function is deprecated and replaced by the "Postscript" output format in calls to the function selectDevice in conjunction with the standard output specification function setOutputFileName

Parameters
filethe destination file
void setProcessLevelDataFile ( RuntimeConfigurationPtr  rcPtr,
const char *  dataFileName 
)

Function that configures the report execution to output an XML datafile

Like the function createProcessLevelDataFile (4GL only) the function causes a data file to be produced that can be used for archiving and reformatting using the function runReportFromProcessLevelDataFile (4GL only). The difference is, that this function causes the file to be created in addition to the regular processing so that as an example, a PDF file and a data file can be created at the same time.

Parameters
dataFileNameName of the data file to generate.
void setRenderingHints ( RuntimeConfigurationPtr  rcPtr,
const char *  values 
)

Function that specifies rendering hints to be used in the rendering process

Can be used to specify the value of rendering hints.

Parameters
valuesAttribute set containing the values
void setRTFMemoryThreshold ( RuntimeConfigurationPtr  rcPtr,
int  memoryThreshold 
)

Function to set the RTF memory threshold

In order to prevent exhaustion of main memory when processing large documents, the processor can be instructed to swap parts of the document to a temporary disk file when the document size exceeds this threshold. The default value is set to 10% of the total available heap space. The default heap space is 64Mb.

Parameters
memoryThresholdThe threshold in bytes above which documents are swapped to disk.
void setSharePortWithGDC ( RuntimeConfigurationPtr  rcPtr,
enum boolean  share 
)

Function that configures the report engine to use the same port as GDC for previewing

Per default the port is shared and the port value specified in the FGLSERVER environment variable is used.

Parameters
shareIf set, the engine will use FGLSERVER as client port.
void setSubject ( RuntimeConfigurationPtr  rcPtr,
const char *  subject 
)

Function to set the report subject meta data value

If the target file format supports meta data then the value is inserted into the target document. The function is intended to be used for compatibility reports. For regular reports the value should be set using the designer to set the corresponding "subject" property on the report root. Calling this function to set the value supersedes that value specified from the '.4rp' template.

Parameters
subjectSubject of the report.
void setSVGCompression ( RuntimeConfigurationPtr  rcPtr,
enum boolean  compressOutput 
)

Function to configure SVG compression

This function is applicable when SVG output has been selected by a call to the function selectDevice. When set, the function causes SVG to be written in compressed form. This causes files and streams to be shrunk to about a tenth of the original size. This can be beneficial to the overall performance in the case of slow networks. The report viewer (GRV) automatically detects if files or streams are compressed and decompresses them on the fly if necessary.

Parameters
compressOutputConfigures whether or not the output should be compressed. The default value is false.
void setSVGCopies ( RuntimeConfigurationPtr  rcPtr,
int  copies 
)

Function to specify the number of copies to be printed.

Specifies the number of copies to be printed. Default value: 1 The function applies only if the option "PrintOnNamedPrinter" is choosen in a call to configureSVGPreview().

Parameters
copiesthe number of copies to print
void setSVGOrientationRequested ( RuntimeConfigurationPtr  rcPtr,
const char *  orientationRequested 
)

Function to control the paper orientation

Controls the paper orientation. Normally this value should not be set. The value is set internally by analyzing the page's width and height values. However, in the case of matrix or label printers which can be loaded with paper of various dimensions (without the printer or the driver being aware of the current format), the value should be set to "portrait" for landscape reports when the printer contains landscape paper. Default: not set

Parameters
orientationRequestedone of : landscape|portrait
void setSVGPageRange ( RuntimeConfigurationPtr  rcPtr,
int  fromPage,
int  toPage 
)

Function to select which pages should be printed

The function applies only if the option "PrintOnNamedPrinter" is choosen in a call to configureSVGPreview().

Parameters
fromPageSelects the lower bound of the range of pages to print. The default value is 1.
toPageSelects the upper bound of the range of pages to create print. Per default, all pages are printed.
void setSVGPaperSource ( RuntimeConfigurationPtr  rcPtr,
const char *  paperSource 
)

Function to select the input source of the printer

Controls what source to take the paper from. This function is applicable only for the "PrintOnNamedPrinter" option the SVG previewer. Furthermore the functionality is available only on Windows. The utility "printerinfo" shipped with the SVG previewer can be used to query for the available printer names and the supported paper sources.

Parameters
paperSourceone of : Auto|Cassette|Envelope|EnvelopeManual|FormSource|LargeCapacity|LargeFormat|Lower|Middle|Manual|OnlyOne|Tractor|SmallFormat or a driver specific value as listed by the utility "printerinfo". The default value is printer driver specific and can typically be selected in the Windows printer configuration dialog.
void setSVGPrinterName ( RuntimeConfigurationPtr  rcPtr,
const char *  printerName 
)

Function to select a specific printer by name

This function is applicable only for the "PrintOnNamedPrinter" option the SVG previewer.

Parameters
printerNamethe name of the printer
void setSVGSheetCollate ( RuntimeConfigurationPtr  rcPtr,
const char *  sheetCollate 
)

Function to control the collation of multiple copies

Specifies whether or not the pages of the document are to be in sequence, when multiple copies of the document are specified by the setSVGCopies function. When sheetCollate is "collated", each copy of the document is printed with the pages in sequence. When sheetCollate is "uncollated", each page is printed a number of times equal to the value of the setSVGCopies attribute in succession. For example, suppose a document produces two pages as output, setSVGCopies is 6, and sheetCollate is "uncollated"; in this case six copies of the first page are printed followed by six copies of the second page. NOTE: It is discouraged to set sheetCollate to "collated" since it requires caching the entire document which is undesirable for large documents. If necessary, produce the document the required number of times. Default: uncollated The function applies only if the option "PrintOnNamedPrinter" is choosen in a call to configureSVGPreview().

Parameters
sheetCollateone of : collated|uncollated
void setTitle ( RuntimeConfigurationPtr  rcPtr,
const char *  title 
)

Function to set the report title

If the target file format supports meta data then the value is inserted into the target document. In the case of SVG output, the value is used as a caption in the viewer. The function is intended to be used for compatibility reports. For regular reports the value should be set using the designer to set the corresponding "title" property on the report root. Calling this function to set the value supersedes that value specified from the '.4rp' template.

Parameters
titleTitle of the report.
void setXLSMergeCells ( RuntimeConfigurationPtr  rcPtr,
enum boolean  mergeCells 
)

Function to configure cell merging in XLS (Excel) output

This function is applicable when XLS output has been selected by a call to the function selectDevice.

Parameters
mergeCellsControls the behavior in case that an item of the report occupies more than one cell. Setting this value causes such cells to be merged into one cell. By default this is the case.
void setXLSXMergeCells ( RuntimeConfigurationPtr  rcPtr,
enum boolean  mergeCells 
)

Function to configure cell merging in XLSX (Excel) output

This function is applicable when XLSX output has been selected by a call to the function selectDevice.

Parameters
mergeCellsControls the behavior in case that an item of the report occupies more than one cell. Setting this value causes such cells to be merged into one cell. By default this is the case.
void setXMLEncoding ( RuntimeConfigurationPtr  rcPtr,
const char *  xmlEncoding 
)

Function to set the XML encoding declaration in the output document

The API has byte semantics and makes not assumptions about the encoding of strings. It is up to the application to ensure that the character encoding and the declaration in the document match. The default encoding is ISO-8859-1

Parameters
xmlEncodinga valid IANA encoding name