PC SOFT

ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Home | Sign in | English EN
  • Substituting the first block of the page header
  • Substituting the Page Footer block
  • Miscellaneous
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
Substitutes one block of the report with another block while the report is printed.
Once iSubstBlock has been run, the following processes will be run when the initial block is printed:
  • "Before printing" event of the substitution block.
  • print the substitution block.
  • "After printing" event of the substitution block.
Versions 15 and later
WINDEVLinux This function is now available for WINDEV applications in Linux.
WEBDEV - Server codeLinux This function is now available for WEBDEV sites in Linux.
Linux Caution: A specific configuration is required to use this function in Linux. For more details, see Printing in Linux.
New in version 15
WINDEVLinux This function is now available for WINDEV applications in Linux.
WEBDEV - Server codeLinux This function is now available for WEBDEV sites in Linux.
Linux Caution: A specific configuration is required to use this function in Linux. For more details, see Printing in Linux.
WINDEVLinux This function is now available for WINDEV applications in Linux.
WEBDEV - Server codeLinux This function is now available for WEBDEV sites in Linux.
Linux Caution: A specific configuration is required to use this function in Linux. For more details, see Printing in Linux.
Versions 18 and later
iPhone/iPad This function is now available for iPhone/iPad applications.
New in version 18
iPhone/iPad This function is now available for iPhone/iPad applications.
iPhone/iPad This function is now available for iPhone/iPad applications.
Versions 21 and later
Universal Windows 10 App This function is now available in Universal Windows 10 App mode.
New in version 21
Universal Windows 10 App This function is now available in Universal Windows 10 App mode.
Universal Windows 10 App This function is now available in Universal Windows 10 App mode.
Versions 25 and later
Android This function is now available for Android applications.
New in version 25
Android This function is now available for Android applications.
Android This function is now available for Android applications.
Example
// Substitution of page header
iSubstBlock(PageHeader, Iteration1)
// End of substitution of page header
iSubstBlock(PageHeader, "")
Syntax
iSubstBlock(<Block to substitute> , <New block>)
<Block to substitute>: Character string
Logical name of the block to replace. This name was defined in the report editor, in the block description ("General" tab, "Name" control).
<New block>: Character string
Logical name of the block used for the substitution. This name was defined in the report editor, in the block description.
If this parameter corresponds to an empty string (""), the current substitution for the <Block to substitute> block is canceled.
If this parameter is equal to <Block to substitute>, the current substitution is canceled.
Remarks

Substituting the first block of the page header

To substitute the first block of the page header, iSubstBlock must be used in an initializing event of the report (for example, in one of the events of the document header block or in the "Opening" event of the report). These events will be run before printing this block.

Substituting the Page Footer block

To avoid display problems, the Page Footer block and its substitution block must have the same height.

Miscellaneous

  • You will get the same result by performing the following operations:
    1. Hide the block (Visible property).
    2. Use iPrintBlock.
  • To substitute a Page Footer block, we recommend that you use blocks with the same height.
  • Versions 19 and later
    In most cases, we recommend that you use planes in the report as they are easier to use and to implement (rather than block substitution). For more details, see The planes.
    New in version 19
    In most cases, we recommend that you use planes in the report as they are easier to use and to implement (rather than block substitution). For more details, see The planes.
    In most cases, we recommend that you use planes in the report as they are easier to use and to implement (rather than block substitution). For more details, see The planes.
Related Examples:
WD Reports Training (WINDEV): WD Reports
[ + ] This example presents the different methods for creating a report:

- prints based on different data sources (queries, variables, ...)
- prints based on controls (Table, Spreadsheet, PVT, ...)
- printing composite reports
- specific prints (portrait/landscape, report with watermark, report with bar code, ...)
Business / UI classification: Neutral code
Component: wd270etat.dll
Minimum version required
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment