- import declarations
- BooleanWP_IsPrinterValid()
True if the the current printer is a valid one. False, otherwise.
- BooleanWP_ArePrintersInstalled()
determines whether at least one printer is installed
True, if a printer is installed, False if it is not.
- BooleanWP_ExecutePrinterSetupDialog(Handle hWndParent)
displays the "printer setup" dialog
window handle of the parent window
True if the OK button pressed; False, otherwise.
- BooleanWP_ExecutePrintDialog(Handle hWndParent)
displays the "Print" dialog
window handle of the parent window
True if the OK button pressed; False, otherwise.
- BooleanWP_GetCurrentDevice(Address aDevice)
retrieves the name of the current printer device
address of the string (255 chars) that will hold the device name upon return
True, if success; False if error occurred
- UIntegerWP_GetPrintDialogFlags()
retrieves the current print options
array of flags representing print-related options that are currently set
- UIntegerWP_GetUserDefinedPapersize()
gets the size of user-defined paper
// hi-word=length; lo-word=width
- BooleanWP_IsPrintDialogFlagSet(UInteger iFlag)
determines whether a specific print-flag is set
the printer flag
True, if the flag is set; False, if it isn't
- BooleanWP_SelectPrinter(String sDevice)
selects a printer programatically
the name of the printer
True, if success; False, if error (such as an invalid printer name)
- BooleanWP_SetFirstPagePaperSource(Integer iBin)
the bim constant
True if success, false if error
- BooleanWP_SetNumberOfPrintCopies(UInteger iNumCopies)
sets the number of copies to print
number of copies to make
Always True
- BooleanWP_SetSpecificPrintDialogFlag(UInteger fFlag)
Sets/unsets one printer flag
printer flag
True, if success; False if error occurred
- BooleanWP_SetPrintDialogFlags(UInteger fFlags)
Sets/unsets all printer flags in one call
printer flags
True, if success; False if error occurred
- BooleanWP_SetUserDefinedPapersize(UInteger iPaperSize)
sets the size of user-defined paper
hi-word=length; lo-word=width
True, if success; False if error occurred
- BooleanWP_SetFontStyle(Integer iStyles)
sets multiple font attributes
series of flags
always True
- BooleanWP_SetFontBold(Boolean bBold)
toggles the bold attribute of the current font
True to switch bold attribute on; False to switch it off
always True
- BooleanWP_SetFontItalic(Boolean bItalic)
toggles the italic attribute of the current font
True to switch italic attribute on; False to switch it off
always True
- BooleanWP_SetFontUnderline(Boolean bUnderline)
toggles the underline attribute of the current font
True to switch underline attribute on; False to switch it off
always True
- BooleanWP_SetFontStrikeout(Boolean bStrikeout)
toggles the strikeout attribute of the current font
True to switch strikeout attribute on; False to switch it off
always True
- BooleanWP_SetFontColor(Integer iColor)
sets the color of the current font
color of the font
always True
- BooleanWP_SetFontHeight(UInteger iHeight)
sets the height of the font
height of the font in points (multiplied by 100. Eg 12.5 point should be sent as 1250)
always True
- BooleanWP_SetFontName(String sFontName)
Sets the name of the font to use
name of the font to use
always True
- BooleanWP_DrawBitmap(String sBitmap Integer iLeft Integer iTop Integer iWidth Integer iHeight Boolean bUpdateCurrentPosition)
Draws a bitmap (BMP, JPG)
Name of the bitmap
distance from left edge to draw bitmap
distance from top edge to draw bitmap
width of the bitmap
height of the bitmap
after drawing, should the current position be updated?
True, if OK; False, if an error occurred.
- BooleanWP_DrawEllipse(Integer iLeft Integer iTop Integer iWidth Integer iHeight Integer iBorderColor Integer iFillColor Boolean bFill UInteger iThickness Boolean bUpdateCurrentPosition Boolean bWrap)
draws an elipse within a bounding rectangle
distance from left edge to draw the ellipse
distance from top edge to draw the ellipse
width of the bounding rectangle
height of the bounding rectangle
color of the ellipse's edge
internal color of the ellipse
should the ellipse be filled? (False=transparent)
thickness of the elipse
after drawing, should the current position be updated?
Should the ellipse be drawn on future soft-page breaks?
True, if OK; False, if an error occurred.
- BooleanWP_DrawLine(Integer iLeft Integer iTop Integer iLength Boolean bHorizontal Integer iColor UInteger iThickness Boolean bUpdateCurrentPosition)
draws a line from the current position
distance from left edge to draw the line
distance from top edge to draw the line
length of the line
draw horizontal? (False=vertical)
color of the line
thickness of the line
after drawing, should the current position be updated?
True, if OK; False, if an error occurred.
- BooleanWP_DrawRectangle(Integer iLeft Integer iTop Integer iWidth Integer iHeight Integer iBorderColor Integer iFillColor Boolean bFill UInteger iThickness Boolean bUpdateCurrentPosition Boolean bWrap)
draws a rectangle
distance from left edge to draw the rectangle
distance from top edge to draw the rectangle
width of the rectangle
height of the rectangle
color of the rectangle's border
internal color of the rectangle
should the rectangle be filled? (False=transparent)
thickness of the rectangle's border
after drawing, should the current position be updated?
Should the rectangle be drawn on future soft-page breaks?
True, if OK; False, if an error occurred.
- BooleanWP_DrawXYLine(Integer iLeftStart Integer iTopStart Integer iLeftEnd Integer iTopEnd Integer iColor UInteger iThickness Boolean bUpdateCurrentPosition Boolean bWrap)
draws a line between two points
distance from left edge to draw from
distance from top edge to draw from
distance from left edge to draw to
distance from top edge to draw to
color of the line
thickness of the line
after drawing, should the current position be updated?
Should the line be drawn on future soft-page breaks?
True, if OK; False, if an error occurred.
- BooleanWP_SetAbsoluteMargins(UInteger iTop UInteger iBottom Boolean bAllPages)
modifies the top/bottom non-printable margin
the top margin offset
the bottom margin offset
should all pages be affected? True=AllPages; False=first page only
always True
- BooleanWP_SetMargins(UInteger iLeft UInteger iTop UInteger iRight UInteger iBottom)
Sets the user-margins
the left margin
the top margin
the right margin
the bottom margin
always True
- HandleWP_CreateDiagram(UInteger eType UInteger eEffect UInteger iWidth UInteger iHeight Boolean bDrawXyAxis)
Creates a new diagram
type of diagram (Bar, Line, Pie)
how it is drawn (2d or 3d, etc)
width of the diagram
height of the diagram
draw the xy-axis (for bar charts only)?
unique id for the diagram used in other diagram funtions
- BooleanWP_AddDiagramEntry(Handle hDiagram String sValueDescription String sValue Integer iBorderColor Integer iFillColor Boolean bFilled UInteger iNumDecimals UInteger eValueOrPercent Boolean bExploded)
Adds an item into a diagram
diagram handle returned by CreateDiagram()
description of the item
value of the item
color of the item's border
color of the item's interior
should the item be drawn filled (with iFillColor), or transparent?
Number of decimals in the sValue argument
How the value should be displayed (as value or percentage, etc)
should the value be "pulled out" (pie charts only)
True, if success; False, if error
- BooleanWP_DrawDiagram(Handle hDiagram UInteger iLeft UInteger iTop Boolean bUpdateCurrentPosition)
draws a diagram
diagram handle returned by CreateDiagram()
x-coordinate to draw the diagram
y-coordinate to draw the diagram
after drawing, should the current position be updated?
True, if success; False, if error
- BooleanWP_LockDiagram(Handle hDiagram)
Locks a diagram so that no more entries can be added
diagram handle returned by CreateDiagram()
True, if success; False, if error
- BooleanWP_SetDiagramCaption(Handle hDiagram String sCaption)
Sets the caption of a diagram
diagram handle returned by CreateDiagram()
the diagram's caption
True, if success; False, if error
- BooleanWP_SetDiagramXText(Handle hDiagram String sText)
Sets the horizontal label of a diagram
diagram handle returned by CreateDiagram()
the diagram's horizonal label
True, if success; False, if error
- BooleanWP_SetDiagramYText(Handle hDiagram String sText Boolean bVerticalText)
Sets the vertical label of a diagram
diagram handle returned by CreateDiagram()
the diagram's vertical label
should the text be drawn vertically (False=horizontally)
True, if success; False, if error
- BooleanWP_BeginHeader(UInteger iHeaderType UInteger iSubHeaderNum)
creates a new header
the type of header
for subheaders, then number (1-0)
always True
- BooleanWP_EndHeader()
declares the end of the current header
always True
- BooleanWP_SetExtraLineCheck(UInteger iNumLines)
forces a soft page break if header plus number of lines don't fit on page
number of lines in addition to header required before forcing a soft page-break
always True
- BooleanWP_SetHeaderFrame(UInteger eFrame Integer iColor UInteger iThickness Integer iFillCol Boolean bFilled)
sets the style, color and frame of a header
style of frame (margin-to-margin, etc)
color of the frame's edge
thickness of the frame
the internal color of the frame (only used if bBilled=True)
True, if the frame should be filled with the iFillColor (False=Transparent)
Always True
- BooleanWP_SetHeaderMargin(UInteger eType Integer iSize)
Sets a margin of space on the inside and outside of the current header
Specifies which margin areas is being set.
Size of the margin setting in the current report metrics
False if document is not started
- BooleanWP_SetHeaderPlacement(UInteger ePlacement)
placement (left, center or right) of the header
placed left, center or right
always True
- BooleanWP_SetHeaderWrap(Boolean bWrap)
determines whether the current header is drawn on soft page-breaks
True, to wrap onto following pages; False, for current page only
always True
- BooleanWP_WriteHeader(UInteger eHeaderType UInteger iSubHeaderNum)
writes a header to the current page
type of header
for subheaders, the number (1-9)
True, if success; False, if error
- IntegerWP_RGBToDFPrintColor(UInteger iRed UInteger iGreen UInteger iBlue)
converts R, G, and B values into a composite color that WinPrint expects
red component (1-255)
green component (1-255)
blue component (1-255)
composite color
- UIntegerWP_GetMetrics()
gets the current unit of measurement
unit of measurement (Inch or CM)
- BooleanWP_SetMetrics(UInteger eMetrics)
sets the unit of measurement
Inch or CM
always True
- BooleanWP_ClearDocument()
clears the resources of the document from memory
always True
- BooleanWP_NewDocument(Boolean bAutoPreview)
starts a new document, but preserves the printer settings
Should the Previewer be displayed immediately
True, if success; False, if an error occurred
- BooleanWP_EndDocument()
Indicates that the document is finished
always True
- BooleanWP_ClearPrinter()
clears all printer and document resources
True, if success; False, if an error occurred
- BooleanWP_ConfirmLines(UInteger iNumLines)
ensures that a specified number of lines will fit on the page; if not, a soft page-break is performed automatically
number of lines that must fit on the page
True, if success; False, if an error occurred
- UIntegerWP_CreatePage(UInteger iNumColumns)
creates a new page of specified columns
number of columns (zero= no columns)
page number that was created
- HandleWP_PreviewDocument(Boolean bPrintDialog Boolean bPrintSetup Boolean bPrint)
previews the current document
Determines whether the Print Dialog (range, etc) is displayed when the "print" button is clicked in the preview window.
Determines whether the Print Setup button is enabled (allows to change orientation, etc)
Determines whether the Print button is enabled
non-zero = hViewerProcess; zero= error
- BooleanWP_ClosePreview()
closes the preview window
True, if closed; False, if an error occurred (such as it not being already open)
- BooleanWP_PrintDocument(Handle hWndParent)
prints the current document
window handle of object to use for any modal output
True, if success; False, if an error occurred
- BooleanWP_SetAlign(UInteger eAlign)
align future text
left, center or right
always True
- BooleanWP_WriteText(String sText Boolean bNewLineAfterPrint UInteger iColumnNum Integer iNumDecimals UInteger iWidth)
write text to the current position or column
the text to write
should a "CR" be written after the text
number of the column to write to (zero=no column, use current position)
number of decimals in the text (-1 means sText is a string)
width of text before truncating
True, if success; False, if an error occurred
- BooleanWP_WriteTextAtPosition(String sText Boolean bNewLineAfterPrint UInteger iPosition Integer iNumDecimals UInteger iWidth)
writes text to a specific position
the text to write
should a "CR" be written after the text
horizontal position to write the text
number of decimals in the text (-1 means sText is a string)
width of text before truncating
True, if success; False, if an error occurred
- BooleanWP_SetProgressCaption(String sProgressCaption)
- BooleanWP_SetReportTitle(String sCaption)
- IntegerWP_ViewerWantsToClose()
- IntegerWP_DisplayMessageBox(String sCaption String sText)
- HandleWP_GetViewerWindow()
- IntegerWP_GetDocumentStatus()
returns dsNotStarted, dsStarted, or dsFinished