array

dfaalbertodfaalberto Member Posts: 9
:(
How can I stamp an array without writing in the section all the elements?
Rather than:
array[1]
array[2]
etc

to write:
array

Comments

  • DenSterDenSter Member Posts: 8,307
    FOR i := 1 to 10 DO BEGIN
      Array[i] := YourValueHere;
    END;
    
  • Luc_VanDyckLuc_VanDyck Member, Moderator, Administrator Posts: 3,633
    dfaalberto wrote:
    :(
    How can I stamp an array without writing in the section all the elements?
    ...

    If "stamp" means "clear" than you can write:
    CLEAR(Array);
    
    to clear all elements of the array.
    No support using PM or e-mail - Please use this forum. BC TechDays 2024: 13 & 14 June 2024, Antwerp (Belgium)
  • RobertMoRobertMo Member Posts: 484
    if "stamp" means print and section means report section...

    You can add a subdataitem with Integer as source table. You add code on OnPreDataItem to filter your integer, e.g. if you have i:=1 to 10, then use SETRANGE(Number,1,10)
    then you just add a filed in body section with source as:
    array[number]
               ®obi           
    ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
  • dfaalbertodfaalberto Member Posts: 9
    :)
    I have found this other solution with the table Integer:
    DataItem Name
    Righe Vendita <Righe Vendita>
    Righe Vendita <Righe Vendita 2>
    Righe Vendita <Righe Vendita 3>
    Temp.Situazione Alleva <Temp.Situazione Alleva>
    Integer <Integer>

    OnPreDataItem
    Integer.SETRANGE(Integer.Numero,1,50);
    OnPostDataItem

    t := 0;

    REPEAT
    t := t + 1;

    "Array Codice Famiglia"[t] := '';
    "Array Ordini A"[t] := 0;
    "Array Ordini B"[t] := 0;
    "Array Ordini C"[t] := 0;
    "Array 3/4 A"[t] := 0;
    "Array 3/4 B"[t] := 0;
    "Array 3/4 C"[t] := 0;
    "Array Ricavi A"[t] := 0;
    "Array Ricavi B"[t] := 0;
    "Array Ricavi C"[t] := 0;
    "Array P.zzo Medio A"[t] := 0;
    "Array P.zzo Medio B"[t] := 0;
    "Array P.zzo Medio C"[t] := 0;

    UNTIL (t = 199);

    // Resetto la conta

    "Totale Clienti A" := 0;
    "Totale Clienti B" := 0;
    "Totale Clienti C" := 0;
    "Cliente Precedente A" := '';
    "Cliente Precedente B" := '';
    "Cliente Precedente C" := '';

    Section
    The body of the table is used Integer and for the elements of the array use the field [Integer.Numero]
Sign In or Register to comment.