PEGetNthFormula

Use PEGetNthFormula to retrieve information about a specific formula in the report. Use this function to obtain the formula name and formula text of a specific formula in the report. This function can be used to retrieve the formula text to allow the user to edit the formula. You can then change the formula text with PESetFormula.

C Syntax
BOOL CRPE_API PEGetNthFormula (
        short printJob,
        short formulaN,
        HANDLE FAR *nameHandle,
        short FAR *nameLength,
        HANDLE FAR *textHandle,
        short FAR *textLength );
Parameters

printJob

Specifies the print job from which you want to gather formula information.

formulaN

Specifies the 0-based number of the formula about which you want to gather information.

nameHandle

Specifies a pointer to the handle of the string containing the formula name.

nameLength

Specifies a pointer to the length of the formula name string (in bytes) including the terminating byte.

textHandle

Specifies a pointer to the handle of the string containing the formula text.

textLength

Specifies a pointer to the length of the formula string (in bytes) including the terminating byte.

Returns

Edit|Formula

VB Syntax

VB Sample Code for modifying formulas

Declare Function PEGetNthFormula Lib "crpe32.dll" (ByVal printJob As 
Integer, ByVal FormulaN As Integer, NameHandle As Long, NameLength As 
Integer, TextHandle As Long, TextLength As Integer) As Integer
Delphi Syntax

Delphi code for getting/setting formulas

function PEGetNthFormula (
    printJob: Word;
    formulaN: integer;
    var nameHandle: Hwnd;
    var nameLength: Word;
    var textHandle: Hwnd;
    var textLength: Word
    ): Bool stdcall;


Seagate Software IMG Holdings, Inc.
http://www.seagatesoftware.com
Support services:
http://support.seagatesoftware.com