PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US
  • 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
LooperBreakSubscript (Function)
In French: ZoneRépétéeIndiceRupture
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.
Versions 16 and later
PHP This function is now available for the PHP sites.
New in version 16
PHP This function is now available for the PHP sites.
PHP This function is now available for the PHP sites.
Versions 17 and later
iPhone/iPad This function is now available for the iPhone/iPad applications.
Android This function is now available for the Android applications.
New in version 17
iPhone/iPad This function is now available for the iPhone/iPad applications.
Android This function is now available for the Android applications.
iPhone/iPad This function is now available for the iPhone/iPad applications.
Android This function is now available for the Android applications.
Versions 20 and later
WEBDEV - Browser code This function is now available in browser code.
New in version 20
WEBDEV - Browser code This function is now available in browser code.
WEBDEV - Browser code This function is now available in browser code.
Example
// The LOOP_Invoices looper 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 looper
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
WHILE MyRow <= LOOP_Invoices..Occurrence
// Subscript of the current break
BreakHeader = LooperBreakSubscript(BRK_CustHeader, MyRow)
BreakFooter = LooperBreakSubscript(BRK_CustFooter, 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> = LooperBreakSubscript(<Break Header/Footer> [, <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>: Character string (with or without quotes)
Name of break header or footer to use.
This parameter can correspond to:
  • <Name of break header/footer>.
  • <Nampe 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

LooperBreakSubscript can be used on a browsing or memory Looper control.
WEBDEV - Browser code This function is not available for the linear Looper controls. This function is available for the Browser Looper controls only.
WEBDEV - Server codePHP This function is available for the Ajax Looper controls and for the Classic Looper controls.

Using LooperBreakSubscript

We advise you to call LooperBreakSubscript once the Looper control is entirely displayed. Otherwise, the subscripts returned by LooperBreakSubscript may not correspond to the subscripts displayed in the Looper control.
Components
WINDEVReports and Queries wd230obj.dll
WEBDEV - Server code wd230page.dll
WEBDEV - Browser code WDJS.DLL
Linux wd230obj.so
Android wd230android.jar
Minimum required version
  • Version 10
This page is also available for…
Comments
Click [Add] to post a comment