home *** CD-ROM | disk | FTP | other *** search
- {******************************************************************************
- Global Constants
- *******************************************************************************}
- Const
- FORM_SIGN =$DEBC;
-
- UNITS_PER_INCH =250;
- NAME_WIDTH =50;
-
- SRC_APPL =0;
- SRC_CALC =1;
- SRC_SYS =2;
- SRC_CONST =3;
- SRC_NONE =4;
- SRC_DLG =5;
-
- TYPE_NUM =1;
- TYPE_DBL =2;
- TYPE_TEXT =3;
- TYPE_LOGICAL =4;
- TYPE_DATE =5;
- TYPE_PICT =6;
-
- SUM_NONE =0;
- SUM_TOTAL =1;
- SUM_AVERAGE =2;
- SUM_COUNT =3;
- SUM_MAX =4;
- SUM_MIN =5;
-
- DT_MMDDYY =0;
- DT_DDMMYY =1;
- DT_MMDDYYYY =2;
- DT_MMMDDYYYY =3;
-
- FLAG_TRIM =$1;
- FLAG_SUP_ZERO =$2;
- FLAG_PAD_ZERO =$4;
- FLAG_CAPS =$8;
- FLAG_FIRST_CAP =$10;
- FLAG_SMALL =$20;
- FLAG_COMMA =$40;
- FLAG_WRAP =$80;
- FLAG_WORD_WRAP =$100;
- FLAG_RETAIN =$200;
- FLAG_FLEX_SIZE =$400;
-
- RFLAG_TRIAL =$1;
-
- ERR_NO_FILE =1;
- ERR_NO_DEVICE =2;
- ERR_NO_MEM =3;
- ERR_BAD_EXP =4;
- ERR_SUSPEND =5;
- ERR_ZERO_DIVIDE =6;
- ERR_TYPE_MISMATCH =7;
- ERR_INCOMPLETE =8;
- ERR_DUPLICATE =9;
- ERR_PRINTER =10;
- ERR_IO =11;
- ERR_DISPLAY =12;
- ERR_WRAP =13;
- ERR_FONT =14;
- ERR_OTHER =15;
-
- ERR_BAD_WND =16;
-
- REP_CLOSE =WM_USER;
-
-
- type
-
- {*****************************************************************************
- Field Structure
- *****************************************************************************}
-
- StrField = record
- source: Integer; { source of field data: application,calculation,system, constant etc }
-
- name: array [0..NAME_WIDTH+1] of char; { field name }
- FileId: Integer; { an optional id that may be defined by the calling application }
- FieldId: Integer; { another optional id that may be defined by the calling application}
- Fieldtype: Integer; { numeric/alphanumeric/logical/date }
- width: Integer; { field data width as stored in your database}
- DecPlaces: Integer; { decimal places for numeric fields }
- AllowChanges: Integer; { Allow modification of the following fields }
-
- InUse: Integer; { TRUE=in use, FALSE=not in use }
- flags: Integer; { flags }
- SumType: Integer; { summary type: total/average/minmum/maximum/none }
- SysIdx: Integer; { index into the system field table for system fields }
-
- DateFormat: Integer; { date format }
- DateDelim: array [0..1] of char; { date delimiter character, i.e. / or - }
-
- CurrencySymbol: array [0..3] of char; { currency symbol }
- LogicalSymbols: array [0..1] of char; { logical TRUE and FALSE symbols }
-
- NegSignPrefix: array [0..3] of char; { negative sign prefix }
- NegSignSuffix: array [0..3] of char; { negative sign suffix }
- PosSignPrefix: array [0..3] of char; { positive sign prefix }
- PosSignSuffix: array [0..3] of char; { positive sign suffix }
-
- CalcExp: array [0..NAME_WIDTH+1] of integer; { expression for the calculated fields }
-
- CharData: pChar; { character data, pointer to an object of size = field.width+1 }
- NumData: LongInt; { numeric data (long) }
- DblData: double; { numeric data for field = TYPE_DBL }
-
- HoldNum: LongInt; { long accumulater: total,minimum,maximum,etc...}
- HoldDbl: double; { double accumulater: total,minimum,maximum,etc...}
- count: LongInt; { number of records in a group during execution }
-
- section: Integer; { section that holds the field (report time only)}
- misc: Integer; { used for miscellaneous purposes }
-
- ParaChar: array [0..1] of char; { specify the new paragraph indicator character
- in the first byte. Needed only for a word/wrapped
- text field. }
-
- reserved: array [0..13] of char; { reserved to pad to 256}
- end;
-
-
- AStrField = array [0..0] of StrField; { pointer to the field structure }
- PStrField = ^AStrField;
-
- {*****************************************************************************
- The parameter structure definition that is used by your application
- to specify the operation parameters and text data to the 'form' routine.
- For an example for using this structure, refer to the demo.c file.
- *****************************************************************************}
-
- StrForm = record
- x: Integer; { Initial x position of the editing window,
- you may specify CW_USEDEFAULT to use default values.}
- y: Integer; { Initial y position of the editing window.}
- width : Integer; { Initial width of the window in device units,
- you may specify CW_USEDEFAULT to use default values.}
- height : Integer; { Initial height of the editing window. When you
- use CW_USEDEFAULT for width, the height parameter is
- ingnored.}
-
- UserSelection: Pointer;
- { Arguments: (hWnd: Handle; fields : StrField; SortLevel: int)
-
- A pointer to the function returning the user
- selected field through the structure pointer.
- Your application returns the chosen field through
- the second parameter. The third argument indicates
- the sort field number. If it is equal to zero,
- it means that the field being sought is not a sort
- field. The function returns a TRUE value if
- successful.
-
- When using ReportEase as a DLL, this pointer must
- be passed using the MakeProcInstance function. Your
- application must define this function as exportatable
- and include it it the EXPORT section of the
- definition file.
- }
-
- VerifyField: Pointer;
- { Arguments: (fields: StrField; SortLevel: integer)
- A pointer to the user routine that validate a
- field name. The field name is passed to the routine
- by the 'name' variable in the StrField structure.
- This routine should also fill the 'type' variable
- in the structure. The second arguement indicates the
- sort field number. If it is equal to zero, it means
- that the field to verify is not a sort field. The
- function returns TRUE to indicate a valid field.
-
- When using ReportEase as a DLL, this pointer must
- be passed using the MakeProcInstance function. Your
- application must define this function as exportatable
- and include it it the EXPORT section of the
- definition file
- }
-
-
- FileName: array [0..129] of char; { form file name. If an existing file is specified,
- the following fields are ignored.}
-
- DataSetName: array [0..19] of char ;{ (Specify for a new file) Your application can
- specify a data set name which can be used to
- associate the application data to the form. This
- is an optional field. }
-
- ShowMenu: WordBool; { show the menu bar ? }
- ShowHorBar: WordBool;{ show the horizonatal scroll bar }
- ShowVerBar: WordBool;{ show the vertical scroll bar }
-
- hInst: THandle; { Handle of the current instanaces. }
- hPrevInst: THandle;{ Handle of the previous instances. }
- hParentWnd: THandle;{ Handle to the parent window }
- hFrWnd: THandle; { Form main window handle, will be filled by RE later }
- style: LongInt; { Editor window style }
- FontTypeFace: array [0..31] of char; { Default type face, example: TmwRmn Courier, etc }
- open: WordBool; { TRUE indicates an open window (parameter block in use)}
- modified: WordBool;{ TRUE when the file modified, and needs to be saved }
- end;
-
-
- {****************************************************************************
- The parameter structure definition that is used by your application
- to specify the operation parameters to start a report execution session.
- For an example for using this structure, refer to the demo.c file.
- ****************************************************************************}
-
- StrRep = record
- FileName: array [0..128] of char; { form file name}
-
- device: char; { P=Printer,S=Screen,A=Ask the user. The following
- 4 parameters are not used if the device is
- set to 'P' }
-
- x: Integer; { Initial x position of the report window,
- you may specify CW_USEDEFAULT to use default values.}
- y: Integer; { Initial y position of the report window.}
- width: Integer; { Initial width of the window in device units,
- you may specify CW_USEDEFAULT to use default values.}
- height: Integer; { Initial height of the editing window. When you
- use CW_USEDEFAULT for width, the height parameter is
- ingnored.}
-
- field: PStrField; { (OUTPUT) pointer to an array of fields used by the
- form.}
- TotalFields: Integer;{ (OUTPUT) Number of fields in the 'field' array. }
-
- SortField: PStrField; { (OUTPUT) pointer to an array of fields used for
- sorting.}
- TotalSortFields: Integer; { (OUTPUT) Number of fields in the 'SortField' array. }
-
- DataSetName: array [0..19] of char;{ (OUTPUT) This field returns the
- data set name associated with the form. Your
- application may use this information to prepare
- data for the report executer }
-
- SwapDir: array [0..59] of char;
- { Directory path to store swapped screen pages
- When this variable is equal to NULL, RE will use
- the current working directory for swapping.}
-
- hInst: THandle; { Handle of the current instanaces. }
- hPrevInst: THandle; { Handle of the previous instances. }
- hParentWnd: THandle; { Handle to the parent window }
- style: LongInt; { Report window style - needed for screen output only }
-
- DrawPicture: Pointer; { Arguments: (hDC: HDC; PictId, FileId, FieldId: integer; rect: TRect;);
- { Pointer to the user routine responsible for
- drawing 'dynamic picture fields'}
- end;
-
- {*****************************************************************************
- Form Header Structure
- *****************************************************************************}
- StrFormHdr = record
- FormSign: Word; { Form File Signature}
-
- name: array [0..NAME_WIDTH+1] of char; { report name}
-
- DataSetName: array [0..19] of char; { Your application can specify a data set
- name which can be used to associate the
- application data to the form. This
- is an optional information. }
-
- TotalItems: Integer; { screen items in the form template }
- FieldCount: Integer; { total number of fields }
- BreakFieldCount: Integer; { total number of break fields }
- FontCount: Integer; { number of entries in the font table }
-
- LeftMargin: Single; { margins in inches}
- RightMargin: Single;
- TopMargin: Single;
- BottomMargin: Single;
-
- SelExp: array [0..NAME_WIDTH+1] of integer; { record selection expression }
-
- Orientation: Integer; { DMORIENT_PORTRAIT or DMORIENT_LANDSCAPE }
- PaperSize: Integer; { paper size given by DMPAPER_* variables used for DEVMODE }
- PaperLength: Integer; { specified in tenths of millimeter, used only if PaperSize = 0 }
- PaperWidth: Integer; { specified in tenths of millimeter, used only if PaperSize = 0 }
- PrintQuality: Integer; { print quality }
-
- PrinterName: array [0..NAME_WIDTH+1] of char; { name of the printer }
- PrinterDriver: array [0..NAME_WIDTH+1] of char; { printer driver name }
-
- flags: Integer; { RFLAG_ series flags }
-
- DateFormat: Integer; { 0=MM/DD/YY, 1=DD/MM/YY }
-
- RulerType: Integer; { RULER_OFF,RULER_INCH,RULER_CM}
-
- SecBannerHeight: Integer; { height (logical units) of the section banner}
- FileFormatId: Integer; { records the file format changes}
- reserved: array [0..145] of char;
- end;
-
-