ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

  • Use conditions
  • Using the <Looper>.BreakSubscript function
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Others
Stored procedures
<Looper>.BreakSubscript (Function)
In french: <Zone répétée>.IndiceRupture
Returns the index of the break header and footer for a given break in a Looper control:
  • The index of the header for a given break also corresponds to the index of the first row in this break.
  • The index of the footer for a given break also corresponds to the index of the last row in this break.
Example
// Le champ Zone répétée ZR_Factures liste les factures de chaque client
// Une rupture sur chaque client est effectuée
// Le bas de rupture contient le champ TotalFacture
// lié à l'attribut ATT_Total
// Ce champ affiche le total de toutes les factures de chaque client
MaRépétition est un entier = 1 // Début du champ Zone répétée
DébutRupture est un entier // Indice du haut de rupture
FinRupture est un entier // Indice du bas de rupture
Indice est un entier // Indice des répétitions
Total est un entier // Total de chaque rupture
 
// Calcul des totaux pour tout le champ Zone répétée
TANTQUE MaRépétition <= ZR_Factures.Occurrence
// Indice de la rupture courante
DébutRupture = RUPT_HautClient.IndiceRupture(MaRépétition)
FinRupture = RUPT_BasClient.IndiceRupture(MaRépétition)
 
// Parcours des répétitions de la rupture courante
// pour calculer le total
POUR Indice = DébutRupture À FinRupture
Total += ATT_Valeur[Indice]
FIN
 
// Affectation du total
ATT_Total[FinRupture] = Total
 
// Passage à la rupture suivante
MaRépétition = FinRupture + 1
FIN
Syntax
<Result> = <Break header/footer>.BreakSubscript([<Subscript>])
<Result>: Integer
  • Index of the specified break header/footer in the break containing the row whose index is <Index>,
  • 0 if an error occurs. To get more details on the error, use ErrorInfo with the errMessage constant.
<Break header/footer>: Control name
Name of the break header or footer to be used.
This parameter can correspond to:
  • the name of the break header or break footer directly.
  • the <Name of Looper control>.<Name of break header/footer>
<Subscript>: Optional integer
Index of one of the rows in the desired break.
If this parameter is not specified, the index of the break header/footer in the break containing the current row is returned.
Remarks

Use conditions

<Looper>.BreakSubscript can be used on:
  • a Looper control based on a data file,
  • a Looper control populated programmatically.
WEBDEV - Browser code This function is not available for Linear Looper controls. This function is available for Looper controls in browser mode only.
WEBDEV - Server codePHP This function is available for Looper controls in Ajax mode, Looper controls in classic mode and Linear Looper controls.

Using the <Looper>.BreakSubscript function

It is recommended to call <Looper>.BreakSubscript once the Looper control is displayed in its entirety. Otherwise, the indices returned by <Looper>.BreakSubscript may not correspond to the actual indices displayed in the Looper control.
Component: wd280obj.dll
Minimum version required
  • Version 23
This page is also available for…
Comments
Click [Add] to post a comment