AYUDA EN LÍNEA
 WINDEVWEBDEV Y WINDEV MOBILE

Este contenido se ha traducido automáticamente.  Haga clic aquí  para ver la versión en inglés.
Ayuda / WLanguage / Funciones WLanguage / Controles, páginas y ventanas / Funciones Looper
  • Use conditions
  • Using the LooperBreakIndex function
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReportes y ConsultasCódigo de Usuario (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Código Navegador
WINDEV Mobile
AndroidWidget Android iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Otros
Procedimientos almacenados
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.
Ejemplo
// 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 is int = 1 // Début du champ Zone répétée
DébutRupture is int // Indice du haut de rupture
FinRupture is int // Indice du bas de rupture
Indice is int // Indice des répétitions
Total is int // Total de chaque rupture

// Calcul des totaux par rupture pour tout le champ Zone répétée
WHILE MaRépétition <= ZR_Factures.Occurrence
// Remise à 0 du total
Total = 0
// Indice de la rupture courante
DébutRupture = LooperBreakIndex(RUPT_HautClient, MaRépétition)
FinRupture = LooperBreakIndex(RUPT_BasClient, MaRépétition)

// Parcours des répétitions de la rupture courante
// pour calculer le total
FOR Indice = DébutRupture TO FinRupture
Total += ATT_Valeur[Indice]
END

// Affectation du total
ATT_Total[FinRupture] = Total

// Passage à la rupture suivante
MaRépétition = FinRupture + 1
END
Sintaxis
<Result> = LooperBreakIndex(<Break header/footer> [, <Index>])
<Result>: Integer
  • Index of the header/footer break specified in the break containing the row at index <Index>,
  • 0 if an error occurs. To get more details on the error, use ErrorInfo with the errMessage constant.
<Break header/footer>: Character string
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.
  • <Name of Looper control>.<Name of break header/footer>
<Index>: Optional integer
Index of one of the rows in the desired break.
If this parameter is not specified, the index of the header/footer break specified in the break containing the current row is returned.
Observaciones

Use conditions

La función LooperBreakIndex puede utilizarse en:
  • a control Looper basada en un archivo de datos,
  • a control Looper poblada programáticamente.
WEBDEV - Código Navegador Esta función no está disponible para los controles del looper lineal. Esta función está disponible para los controles Looper sólo en modo navegador.
WEBDEV - Código ServidorPHP Esta función está disponible para los controles del looper en modo Ajax, los controles del looper en modo clásico y los controles del looper lineal..

Using the LooperBreakIndex function

It is recommended to call LooperBreakIndex once the Looper control is displayed in its entirety. Otherwise, the indices returned by LooperBreakIndex may not correspond to the actual indices displayed in the Looper control.
Clasificación Lógica de negocio / UI: Código UI
Componente: wd290obj.dll
Versión mínima requerida
  • Versión 10
Esta página también está disponible para…
Comentarios
Haga clic en [Agregar] para publicar un comentario

Última modificación: 20/12/2023

Señalar un error o enviar una sugerencia | Ayuda local