How to use User define function?

edited December 2005 in FastReport 3.0
I add:

uses 'd:\delphi\project\MyFunction';

at the top of FR script but error "BEGIN" expected.

FROM FR User Manual:
wrote:
Structure of a script
Script???s structure depends on the language you use; however there are some
common elements. They are the script???s title, body, and the main procedure, which will be executed when the report runs. Below there are examples of the scripts for all four supported languages:

PascalScript???s structure:

#language PascalScript // optional
program MyProgram; // optional
// the ???uses??? chapter should be located before any other chapter
uses 'unit1.pas', 'unit2.pas';

Some posting on this forum refer to fr newgroup but unfortunately I can not access the newsgroup. Nothing futher explatnation to in FR docs.

Comments

  • edited 3:37AM
    Try so:
    uses 'd:\delphi\project\MyFunction.pas';
    ..
    ..
    ..
    
    in MyFunction.pas
    function MyFunction(x:integer):integer;
    begin
    ....
    end;
    
    begin
    end.
    

Leave a Comment

Rich Text Editor. To edit a paragraph's style, hit tab to get to the paragraph menu. From there you will be able to pick one style. Nothing defaults to paragraph. An inline formatting menu will show up when you select text. Hit tab to get into that menu. Some elements, such as rich link embeds, images, loading indicators, and error messages may get inserted into the editor. You may navigate to these using the arrow keys inside of the editor and delete them with the delete or backspace key.