PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

  • Overview
  • Principle for printing in an iPhone/iPad application or in Universal Windows App mode
  • Limitations
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
Printing a report (iPhone/iPad or Universal Windows App)
Overview
When creating a report, the test of this report can be run from the report editor.
You also have the ability to include this report in your applications. The user will have the ability to print the report from a button, a menu option, ... for example.
In the iPhone or iPad applications or in the applications in Universal Windows App mode, the report can be printed in PDF format only. Then, this PDF file can be printed, viewed, emailed, ...
Versions 21 and later
Universal Windows 10 App You now have the ability to print reports from an application in Universal Windows App mode.
New in version 21
Universal Windows 10 App You now have the ability to print reports from an application in Universal Windows App mode.
Universal Windows 10 App You now have the ability to print reports from an application in Universal Windows App mode.
Principle for printing in an iPhone/iPad application or in Universal Windows App mode
The principle for printing a report is straightforward: a PDF file is created when printing the report. Then, all you have to do is open this PDF file in the appropriate software and print it on the printer configured for the computer used.
Regardless of the type of report to print, the principle for printing a report is as follows:
  1. Specify the print mode of report (generation of a PDF file) with iDestination.
  2. Start the print in PDF format with iPrintReport.
  3. Then, you will have the ability to:
    • display the generated file on the user computer (ShellExecute).
    • iPhone/iPad print the generated PDF file via the iOS print system (iPrintPDF).
    • ...
Caution: Check the following points:
  • You must have the rights to write into the directory where the document will be generated.
    If you generate a report in PDF format, this file can be saved in the data directory (path returned by fDataDir).
  • Use a specific name for each generated document. Otherwise, several simultaneous prints would overwrite the prints already performed.
This principle must be adapted according to the data source used in each report.
Example:
// Print the order form
FileName = fDataDir() + [fSep()] + StringBuild("ORF_%1.PDF", OrderNumber)
iDestination(iGenericPDF, FileName)
iPrintReport(RPT_OrderForm, OrderNumber, OrderNumber)

// Check the existence of the file
IF fFileExist(FileName) = False THEN
Error("The PDF file was not generated")
RETURN
END

// Confirmation to display the PDF
IF YesNo(Yes, "Display the generated order form (PDF format)?") = Yes THEN
// Display the generated order form
ShellExecute(FileName)
ELSE
iPrintPDF(FileName)
END
The following paragraphs present:
Limitations
In the iPhone/iPad applications or in the applications in Universal Windows App mode, the limitations for the reports created with the report editor are as follows:
  • The RTF is not supported: no control in RTF format, ...
  • Only the Chart controls created from version 17 are available.
  • The following controls are not available anymore:
    • The edit controls.
    • The HTML controls.
    • The Spreadsheet controls.
    • The Signature controls.
    • The Organizer and Scheduler controls.
    • The Gantt Chart controls.
    • The Pivot Table controls.
Related Examples:
WM CRM Cross-platform examples (WINDEV Mobile): WM CRM
[ + ] WM CRM is a multi-platform project for Android and iOS.
It explains how to develop a CRM application intended to the Android and iPad tablets.
WM Expense Account Cross-platform examples (WINDEV Mobile): WM Expense Account
[ + ] This example allows you to manage your fees.

Let's see the main features of this application:
- The input of invoices
- Management of foreign currencies
- Inclusion of photo document for the invoices
- Ability to email the expense account
- Ability to track the expense accounts
- ...
WM Managing Contacts Cross-platform examples (WINDEV Mobile): WM Managing Contacts
[ + ] This example presents the management of contacts for Android et iOS.
It is used o:
- list the contacts found on the phone
- call the contacts
- send SMSs to the contacts
- ...
WM Managing Orders Cross-platform examples (WINDEV Mobile): WM Managing Orders
[ + ] The WM Managing Orders example is a simplified management of orders and invoices.
This example is used to:
- create/modify/delete a product,
- create/modify/delete a customer,
- contact a customer by email,
- see the history of the actions performed for a customer
- place an order, print an order form,
- invoice an order, print an invoice.
Minimum required version
  • Version 18
This page is also available for…
Comments
Click [Add] to post a comment