Internal functions and commands
Previous Top Next


Function (Hbprn:maxrow()) returns the maximum height in the page form
Function
(Hbprn:maxcol()) returns the maximum width of the page form
Function
(Hbprn:docname:="Fantasy Print demo") Sets the name of Document listed in Print spooler or the Filename for Pdf ouput.
Function
GROUP

It set the parameters necessary for the definition of the groups parameters:
Gfield
:= Name of key field
type: string
s_head
:= definition string of group
type: string **
s_col
:= a column where definition will be printed
type: number or "AUTO"
gftota
:= name of field to calculate totals on
type: string
wheregt
:= a column where  the grand total will be printed
type: number or "AUTO
s_total
:= string with the description of total of group
type: string **
t_col
:= a column where  total of group will be printed
type: number or "AUTO
P_f_e_g
:= Print one page for each group
type: Logical

Gfield and at least a second parameter is necessary Ex.: ("visita_fis",,,,,"End of Group")
the database must have the active index otherwise, the function Group will not be carried out!

** if you use {|| MyFunc()} as codeblock , the MyFunc() will be evaluated

The return value of MyFunc()  MUST BE A STRING.

The function Group can be put ONLY in the section [DECLARE]

Valid examples:

GROUP visita_fis, Head of Group, AUTO, IMPORTO, AUTO, End of Group, 12, .t.
GROUP [first],  [    ** Name **  ], AUTO,{ INCOMING,CODE},amount , AUTO, [** Subtotal **],4,.f.

** GROUP [first], {||MyheadFunc()}, AUTO,{ INCOMING,CODE},amount , AUTO, {||MySbtFunc()},4,.f.

Native names used in the function: GROUP(GField,s_head,s_col,gftotal,wheregt,s_total,t_col,atr)

Function
VAR (VarName,Value,type of variable)

It creates a public variable and assigns a value to it.

Ie.
var/ADO/0/n  m->Ado will be numerical and equal to 0
    
var/Adi/[Cash]/C m->Adi will be a string containing "Cash"


Function
GRIDCOL (.t.) to print a grid only in front page.
            return nil

            The number of lines and columns that will be printed dipend on the number
            declared in the section [DECLARE]
            The parameters serve to print only the lines or the columns
            default is print everything (. t.)

             ATTENTION only if complete for parameter they will be carried out.
             Ex. Gridcol(.t.)
                  Gridrow (.f.)
                  The only condition of Gridrow (.f.) will be performed.

                 GRIDROW(.f.) To print in 1 Pag. colums
                 returns nil

GRIDROW and GRIDCOL can be replaced by "SET RULER"

Function WRVERSION()  return the current WinReport version release

Function
MEMOSAY (arg1,arg2,argm1,argl1,argf1,argcolor1,argalign,onlyone)
 
It is used to print the memo fields and array
 
arg1
:= line to print on
type: number
arg2
:= column to print on
type: number
argm1
:= name of Memo field or array to print
type: variant
argl1
:= the maximum width of Memo
type: number
argf1
:= font to use
type: string
argcolor
:= color to use
type : string or array see <color>
argalign
:= the alignment type
type: string
onlyone
:= if shown it prints only a line
type: char

Function
PUTARRAY and MEMOSAY (arg1,arg2,argArry1,argl1,argf1,argcolor1)
 
It is used to print the array
 
arg1
:= line to start print on
type: number
arg2
:= column to start print on
type: number
argArry1
:= name of Array (only for reference)
type: variant
awidths,
:= the maximum width of single array field
type: array
argf1
:= font to use
type: string
argcolor
:= color to use
type : string or array see <color>
NOFRAME
If this does not add the object frame       NOT SUPPORTED FOR MEMOSAY

 
 ED_G_PIC
(<var>)
Return the correct size for the picture clause and it is influenced by command SET SEPARATOR.
 
 
Ex. ed_g_pic(Field->incoming)
DIVISOR
(<var1>,<var2>)
Returns  the result of the division between <var1>and<var2>
 
 
Is protect from divide by 0.
If<var2>=0 he returns<var1>
Ex. divisor (10,2) =>Return 5
Ex. divisor (10,0) =>Return 10
WRVERSION
 
Return the current WinReport version

 
SET COMMANDS
 
 
 SEPARATOR
<var>
Where var can be:=0->OFF =->. F. one or 1>. t. =->ON
 
 
It adds the separators of decimals and thousands
 
 
Command applies the size entirely, at all the numbers
MONEY
<var>
Where var can be:=0->OFF =->. F. one or 1>. t. =->ON
 
 
Ex. set money off
 
 
It adds two zeroes to the numbers without decimals
 
 
Command is not applied entirely, but only individually See Example
EURO
<var>
Where var can be:=0->OFF =->. F. one or 1>. t. =->ON
 
 
Ex. set euro off
 
 
It changes the separator of the thousands and decimals in the European format.
The option is not applied totally, but singularly and in the groups totals.
CLOSEPREVIEW
<var>
Where var can be:=0->OFF =->. F. one or 1>. t. =->ON
 
 
If active it closes preview after print.
COPIES TO
<var>
preset the number of copies to print  (NOT VALID FOR PDF OUTPUT)
 
 
Ex. Set copies to 2

 
SET
COMMANDS
 
GROUP DEDICATED
SUBTOTALS
<var>
Where var can be:=0->OFF =->. F. one or 1>. t. =->ON
 
 
It prints or not the subtotals.
SHOWGHEAD
<var>
Where var can be:=0->OFF =->. F. one or 1>. t. =->ON
 
 
It prints or not the head of group.
INLINESBT
<var>
Where var can be:=0->OFF =->. F. one or 1>. t. =->ON
 
 
It print the subtotal on the same row of description string (default on)
TOTALSTRING
<var>
Example SET TOTALSTRING [** Total **]
 
 
If var is empty the great total of group will be not printed.
INLINETOT
<var>
Where var can be:=0->OFF =->. F. one or 1>. t. =->ON
 
 
It print the total on the same row of description string (default on)

 
SET
COMMANDS
 
RULERS
VRULER
(<pos1>,<var2>)
Where pos1 is the horizontal desired position of the ruler
 
 
Where var2 can be:=0->OFF =->. F. one or 1>. t. =->ON
HRULER
(<pos1>,<var2>)
Where pos1 is the vertical desired position of the ruler
 
 
Where var2 can be:=0->OFF =->. F. one or 1>. t. =->ON

 
SET
COMMANDS
 
PDFONLY
HPDFDOC
 
 
SET HPDFDOC COMPRESS ALL
SET HPDFDOC PAGENUMBERING FROM 1 STYLE LETTERS PREFIX "Page: "
SET HPDFDOC PASSWORD OWNER [YourName] USER [TEST]
SET HPDFDOC PAGEMODE TO OUTLINE
SET HPDFDOC PAGEOUTLINE TITLE [Demo image] PARENT "MISC"
 
HPDINFO
 
SET HPDFINFO DATECREATED TO [01-01-2013] TIME [19:00:00]
SET HPDFINFO AUTHOR TO [Pierpaolo Martinello]
SET HPDFINFO CREATOR TO [Pierpaolo Martinello]
SET HPDFINFO TITLE  TO [Report interpreter Pdf export]
SET HPDFINFO SUBJECT TO [A Test of pdf creation with Report Interpreter]
SET HPDFINFO KEYWORDS TO [HMG, HPDF, Documentation, LibHaru, Harbour, MiniGUI]


The old function Rc2pix is not supported

Continued on page Appendix A