PC SOFT

WINDEVWEBDEV AND WINDEV MOBILE
ONLINE HELP

Home | Sign in | English UK
  • Use conditions
  • Using LooperBreakSubscript
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadApple WatchUniversal Windows 10 AppWindows Mobile
Others
Stored procedures
<Looper>.BreakSubscript (Function)
In french: <Zone répétée>.IndiceRupture
Returns the subscript of the break header and footer for a given break in a Looper control:
  • The subscript of the break header for a given break also corresponds to the subscript of the first row in this break.
  • The subscript of the break footer for a given break also corresponds to the subscript of the last row in this break.
Example
// The LOOP_Invoices Looper control lists the invoices of each customer
// A break is performed for each customer
// The break footer contains the TotalInvoice control
// linked to the ATT_Total attribute
// This control displays the total of all invoices for each customer
MyRow is int = 1 // Beginning of the Looper control
BreakHeader is int // Subscript of break header
BreakFooter is int // Subscript of break footer
Subscript is int // Subscript of rows
Total is int // Total for each break
 
// Calculate the totals for the entire Looper control
WHILE MyRow <= LOOP_Invoices..Count
// Subscript of current break
BreakHeader = BRK_CustHeader.BreakSubscript(MyRow)
BreakFooter = BRK_CustFooter.BreakSubscript(MyRow)
 
// Browse the rows found in the current break
// to calculate the total
FOR Subscript = BreakHeader TO BreakFooter
Total += ATT_Value[Subscript]
END
 
// Assign the total
ATT_Total[BreakFooter] = Total
 
// Go to the next break
MyRow = BreakFooter + 1
END
Syntax
<Result> = <Break header/footer>.BreakSubscript([<Subscript>])
<Result>: Integer
  • Subscript of the specified break header/footer in the break containing the row whose subscript is <Subscript>,
  • 0 if an error occurred. To find out the error details, use ErrorInfo associated with the errMessage constant.
<Break header/footer>: Control name
Name of break header or footer to use.
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
Subscript of one of the rows found in the requested break.
If this parameter is not specified, the subscript of the break header/footer found in the break containing the current row is returned.
Remarks

Use conditions

<Looper>.BreakSubscript can be used on a browsing or memory Looper control.

Using LooperBreakSubscript

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