PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US
  • Substituting the first block of the page header
  • Substituting the Page Footer block
  • Various
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
Substitutes a report block for another block while the report is printed.
Once iSubstBlock has been run, the following processes will be run when the initial block must be printed:
  • "Before printing" process of the substitution block.
  • print the substitution block.
  • "After printing" process of the substitution block.
Versions 15 and later
WINDEVLinux This function is now available for the WINDEV applications in Linux.
WEBDEV - Server codeLinux This function is now available for the WEBDEV sites in Linux.
Linux Caution: A specific configuration is required to use this function in Linux. See Printing in Linux for more details.
New in version 15
WINDEVLinux This function is now available for the WINDEV applications in Linux.
WEBDEV - Server codeLinux This function is now available for the WEBDEV sites in Linux.
Linux Caution: A specific configuration is required to use this function in Linux. See Printing in Linux for more details.
WINDEVLinux This function is now available for the WINDEV applications in Linux.
WEBDEV - Server codeLinux This function is now available for the WEBDEV sites in Linux.
Linux Caution: A specific configuration is required to use this function in Linux. See Printing in Linux for more details.
Versions 18 and later
iPhone/iPad This function is now available for the iPhone/iPad applications.
New in version 18
iPhone/iPad This function is now available for the iPhone/iPad applications.
iPhone/iPad This function is now available for the 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.
Example
// Substitution of page header
iSubstBlock(PageHeader, Iteration1)
// End of substitution of page header
iSubstBlock(PageHeader, "")
Syntax
iSubstBlock(<Name of Block to Substitute> , <Name of New Block>)
<Name of Block to Substitute>: Character string with or without quotes
Logical name of the block to replace. This name was defined in the report editor, in the block description ("General" tab, "Name" control).
<Name of New Block>: Character string with or without quotes
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 <Name of Block to Substitute> is canceled.
If this parameter is equal to <Name of 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 code of the report (in one of the codes of the "Start of document" block or in the opening code of the report for example). These code segments will be run before this block is printed.

Substituting the Page Footer block

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

Various

  • You will get the same result by performing the following operations:
    1. Make the block invisible (..Visible).
    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). See The planes for more details.
    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). See The planes for more details.
    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). See The planes for more details.
Related Examples:
WD DuplexPrintout Training (WINDEV): WD DuplexPrintout
[ + ] This example presents a solution for duplex printout that can be disabled, which means that the reverse sides may not be printed.
In this example, the general sales conditions will be inserted into a report by using the principle of block substitution.
These general conditions are inserted between each page.
The example allows you to print:
- in duplex mode if the printer supports it,
- on the front side of pre-printed sheets for which the general sales conditions are printed on the back side.
Components
WINDEVWEBDEV - Server codeReports and Queries wd230etat.dll
Windows Mobile wp230etat.dll
Linux wd230etat.so
Minimum required version
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment