PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US
  • Overview
  • Printing on a printer selected by the user
  • Printing on a printer directly
  • Overview
  • Printing on a type of printer
  • Printing on a printer referenced on the Mobile Device (Pocket PC)
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
Overview
The report editor allows you to create printed reports (such as forms, tables or labels) containing information coming from data files.
The principle for printing a report from a Mobile Device (Pocket PC) is straightforward: a PCL file is created when the report is printed and this file is sent to the destination printer. The content of the PCL file is specific to the printer used.
The steps for printing a report created in the report editor are as follows:
  1. Configuring the print parameters:
  2. Printing the report.
Note : The result of the print differs according to the selected printer. See Characteristics of a print on Mobile Device (Pocket PC) for more details.
Printing on a printer selected by the user
A specific window allows the user to choose the printer that will be used. See Configuring the printer used for more details.
The user can add a new printer if no printer is listed.
To perform this type of print, you must:
  1. Use iConfigure or iParameter (without specifying any parameter).
  2. Use iPrintReport and specify the name of the report to print.
Example: The RPT_Customer report will be printed on the printer selected by the user in the configuration window.
Then, this printer will be automatically used for all the other prints performed by this application.
// Select the printer
iConfigure()
// Print the report
iPrintReport(RPT_Customer)
Note: In order for the printer to become the default printer for all the applications, use the command:
iConfigure(False)
Printing on a printer directly

Overview

WINDEV Mobile proposes 2 modes for printing on a printer directly:
  • direct print by defining the type of printer used.
  • print on one of the printers referenced on the Mobile Device.

Printing on a type of printer

You have the ability to directly print a report on a printer associated with a Mobile Device. In this case, you must:
  1. Configure the destination of the print with iDestination. This allows you to specify whether the print is performed in a PCL file or on a printer (infrared, WiFi, Bluetooth or network).
  2. Use iParameter with the "PrinterType" parameter to specify the type of printer to use. The printer used must correspond to one of the printers recognized by WINDEV Mobile. See Type of printers supported by WINDEV Mobile for more details.
  3. Print the report with iPrintReport.
Example: The RPT_Customer report will be printed on the DeskJet 350 type printer, connected via infra-red to the Mobile Device (Pocket PC).
// Print on an infrared printer
iDestination(iPCL, "IRDA:")
// Specify the type of printer
iParameter("PrinterType=Deskjet 350")
// Print the report
iPrintReport(RPT_Customer)

Printing on a printer referenced on the Mobile Device (Pocket PC)

To print on one of the printers referenced on the Mobile Device (without opening the window for printer selection), you must:
  1. Configure the printer to use with iConfigure. All you have to do is specify the name of the printer to use. This name must correspond to a name specified in the window for printer selection.
  2. Print with iPrintReport.
Example: The RPT_Customer report will be printed on the "InfraPrnt" printer configured on the Mobile Device.
Then, this printer will be automatically used for all the other prints performed by this application.
// Select the printer by programming
iConfigure("InfraPrnt")
// Print the report based on the "TABLE_Customer" control
iPrintReport(RPT_Customer)
Tip: The printers referenced on a Mobile Device are stored in the registry of the Mobile Device. To add a new printer configuration by programming, all you have to do is modify the registry of the Mobile Device. See Configuring the printer used for more details.
Related Examples:
PC Managing lists of purchases Mobile Windows (WINDEV Mobile): PC Managing lists of purchases
[ + ] This example is used to manage a list of stores, departments, products and purchases.
Summary of the example supplied with WINDEV Mobile:
This example enables you to manage:
- stores
- departments per store
- common products classified per department
- lists of purchases with priority order per department
You also have the ability to transfer the content of a purchase list to a Pocket PC or to a Smartphone via the 'Pocket Managing lists of purchases' example.
The following topics are presented in this example:
1/ Database with relation files
2/ Printing reports on a query with parameters
3/ Transferring the data to a Pocket PC or to a Smartphone (via ActiveSync)
4/...
Minimum required version
  • Version 9
Comments
Click [Add] to post a comment