PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US
  • Overview
  • How to send faxes?
  • Programming the sending of faxes
  • Sending a fax from a WINDEV application or from a WEBDEV site
  • Sending a fax created with the report editor
  • Configuring the fax server by programming
  • Options of fax server
  • Tips
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
Sending faxes with WINDEV and WEBDEV
Overview
To send faxes from an application or from a site, WINDEV and WEBDEV propose several functions allowing you to send faxes via the system fax server available in Windows XP and Windows 2000.
Note: In Windows Vista, the management of faxes is available in Windows Vista Professional Edition and Windows Vista Ultimate Edition.
How to send faxes?
To send faxes from a WINDEV application or from a WEBDEV site, you must:
Programming the sending of faxes

Sending a fax from a WINDEV application or from a WEBDEV site

To send a fax from a WINDEV application or from a WEBDEV site, you must:
  1. Prepare the fax, which means the file that will be sent. A specific first page (called "Cover page") can also be attached to the fax. This cover page is a ".cov" file and it can be created from the fax server.
  2. Use FaxConnect. This function is used to connect the WINDEV application to the fax server installed on the current computer.
  3. Send the fax:
    • by FaxSend. When sending the fax, you have the ability to specify the name of a WLanguage procedure. This procedure will be called whenever the status of the fax is modified by the fax server. The status of the fax is returned by FaxStatus. This function is used to fill the FaxCompleteStatus structure containing the characteristics of the fax.
    • with iPreview and the print functions. This solution allows you to directly print a report created with the report editor. In this case, you can give a name to the fax sent. The status of the fax will be returned by FaxStatus. This function is used to fill the FaxCompleteStatus structure containing the characteristics of the fax.
      Note: A single fax can be sent at a time. However, FaxSend can be run several times in a row: the faxes will be added to the fax queue. The WLanguage procedure combined with FaxStatus allows you to find out which fax is currently processed. This function is used to fill the FaxCompleteStatus structure containing the characteristics of the fax.
  4. When the faxes have been sent, all you have to do is disconnect the WINDEV application from the fax server with FaxDisconnect.

Sending a fax created with the report editor

To send a fax created with the report editor, you can:
  • use iPreview only (syntax 3). The report printed by iPrintReport will be sent to the specified fax number. In this case, you cannot follow the progress of the fax.
    // Sends the "RPT_CustInvoice" report by fax
    iPreview(iFax, "0006050402")
    iPrintReport(RPT_CustInvoice)
  • use the Fax functions and iPreview (syntax 4). iPreview establishes (if necessary) a connection to the fax server and returns the identifier of this connection. This identifier can be used by the Fax functions to follow the progress of the send operation.
    // Sends the "RPT_CustInvoice" report by fax
    ConnectID is int
    ConnectID = iPreview(iFax,"0006050402", "MyFax","\\MyFax\FaxPrinter")
    // "\\MyFax\FaxPrinter" is the share name of the fax printer
    iPrintReport(RPT_CustInvoice)
Configuring the fax server by programming

Options of fax server

The standard fax server of Windows proposes several options that can be configured directly from the interface of the fax server. These different options can be configured by programming via the registry. You have the ability to configure and find out:
  • information regarding the sending of faxes (Windows 2000):
    The corresponding registry key is HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Fax:
    Number of attemptsRetries
    Number of minutes between two attemptsRetry Delay
    Number of days before deleting the unsent faxesDirty Days
    Archive the outgoing faxesArchiveOutgoingFax
    Directory of outgoing faxesArchiveDirectory
    Print the top headerBranding
    Forbid the custom cover pagesServerCoverPageOnly
    Time when the economy rate startsStartCheapTime
    Time when the economy rate endsStopCheapTime
  • information regarding the sender of the fax (Windows 2000):
    The corresponding registry key is HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Fax\UserInfo:
    Number of the fax senderFaxNumber
    Mailbox AddressMailbox
    CompanyCompany
    TitleTitle
    Full nameFullName
    ServiceDepartment
    Business addressOffice
    Home phoneHomePhone
    Business phoneOfficePhone
    Displays the status monitor when sending AND receiving faxesVisualNotification
    Status monitor always on the topAlwaysOnTop
    Sound notificationSoundNotification
    Billing codeBillingCode

Tips

To create a fax server and manage the redial, we advise you to specify the following options in the fax manager:
  • No retry for sending faxes:
    RegistrySetValue("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Fax","Retries",0)
  • Time-out set to 0 mn between two attempts:
    RegistrySetValue("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Fax","Retry Delay",0)
  • 0 day for keeping the unsent faxes:
    RegistrySetValue("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Fax","Dirty Days",0)
It is possible to consider that a fax whose status changed from FaxStatusInit OR FaxStatusCall to FaxStatusInactive was attempted to be sent once. Then, this fax can be re-sent (it will not be automatically re-sent because "No retry for sending faxes" is set to True).
Related Examples:
Sending a fax Unit examples (WINDEV): Sending a fax
[ + ] Sending a fax with WINDEV. The fax can be sent via a fax server or via a modem properly installed and configured on the user computer.
WD Sending faxes Sample components (WINDEV): WD Sending faxes
[ + ] This example is using the WINDEV SendingFaxes component.

This component is used to send a FAX typed in text or RTF format.
Minimum required version
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment