Variables as first line in Procedure in Scipt

dschuchdschuch Dresden,Germany
edited November 2004 in FastReport 3.0
Hi,

thats my procedure:

procedure Band2OnBeforePrint(Sender: TfrxComponent);
begin
<span style='color:red'> <HL>:=NOT <HL>;</span>
end;

HL is a declared variable but i get
';' expected.

[HL]:=NOT [HL]
HL:=NOT HL

won't work too.

If <HL> then
<span style='color:red'>HL:=False</span>
else
HL:=True;

also does not work with error in line 2. (Red - ';' expected)
[] or <> doesn't take a matter.

(FR 3.06)

Daniel

PS only to become sure:

In scripts variables has to be inside <>? Is that right?
Functions not?

Comments

  • gordkgordk St.Catherines On. Canada.
    edited 4:36AM
    re read the user manual on variables.
    if not in the dictionary they must be declared at the top of the code page
    to be global to all the reports events and objects
    before the initial blank begin end.
    var
    myvarname: string;
    or at the beginning of a specific procedure to be available to that procedure only.

    they then can be used with out any <> in code and if you want to insert in a memo
    use [];

    ;)

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.