PC SOFT

WINDEVWEBDEV AND WINDEV MOBILE
ONLINE HELP

Home | Sign in | English UK
New WINDEV Mobile 24 feature!
  • Overview
  • How to?
  • Generating the print script
  • Use the generated code
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
Generating the print script
Overview
From version 24, the report editor makes it possible to generate the sequence of WLanguage iPrintxxx commands corresponding to the static report.
The controls are positioned in the same way they appear in the report editor. The font, color and attributes are kept.
This allows you to use the report generator as print code generator.
  • The generated code is structured, with an internal procedure for each block, for example.
  • Preset controls are identified and generated with the WLanguage code that is needed to keep them working.
Then, simply add a little code to make loops, replace variables, ... It is also possible to request the generation of the code only for a control or a block.
How to?

Generating the print script

To generate the print script of a report:
  1. In your Android project (or in the Android project configuration), create a report with the report editor. See Creating a report for more details.
  2. In the report editor, in the "Creation" pane, "Android" group, click on "Generate the print script".
  3. In the window that opens up, the print script is automatically generated.
    • It can be copied using the "Copy" button.
    • If the report uses dependencies (images, etc.), they must be included in the project:
      • automatically via "Include the report dependencies in the project".
      • via the project's element list: on the "Project" pane, in the "Project" group, expand "List of elements" and select "List of project elements". In the window that appears, add the desired elements using the "Add" button.
Note: In multilingual reports, the generated strings are not multilingual.

Use the generated code

The generated code must be copied into the code of a button to print. This code contains several procedures for carrying out the various print operations.
  • Declaration of fonts.
  • Print the START_OF_DOCUMENT block.
  • Print the PAGE_HEADER block.
  • Print the BODY block: your data must be printed in this procedure.
  • Print the PAGE_FOOTER block.
  • Print the END_OF_DOCUMENT block.
The end of the generated code contains the actual print code that is used to generate a PDF document.
See Customizing a print script for more details
Minimum version required
  • Version 24
Comments
Click [Add] to post a comment