13.07.2015 Views

Reports & Queries - Source : www.pcsoft-windev-webdev.com

Reports & Queries - Source : www.pcsoft-windev-webdev.com

Reports & Queries - Source : www.pcsoft-windev-webdev.com

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

WinDev example:The user selects the customers to whom a promotional offer must be sent. The name ofthe selected customers is found in the "Recipient" list box.Once all the customers have been selected, the user clicks the "Print" button in order toprint the "RPT_MemZoneReport" report.During a click on the "Print" button:• the "MemZone" memory zone is created.• the record number of each selected customer is retrieved and added into the"MemZone" memory zone.• the "RPT_MemZoneReport" report is printed.• the "MemZone" memory zone is destroyed.In this example, the click code of the "Print" button is as follows:nSubscript is int// Create the memory zoneMemCreate("MemZone")// Browse the Recipient list and// initialize the memory zoneFOR nSubscript = 1 TO Recipient..Occurrence// Find the current recordHReadSeek(Customer, Name, Recipient[nSubscript])IF HFound(Customer)=True THEN// Add elements into the memory zoneMemAdd("MemZone", "", HRecNum())ENDEND// Open the preview windowiPreview()// Print the reportiPrintReport(MemZoneReport, "MemZone")// Destroy the memory zoneMemDeleteAll("MemZone")WebDev example:The Web user selects the customer to whom a promotional offer must be sent. The nameof the selected customers is found in the "Recipient" list box.Once all the customers have been selected, the Web user clicks the "Print" button in orderto print the "RPT_MemZoneReport" report.During a click on the "Print" button:• the "MemZone" memory zone is created.• the record number of each selected customer is retrieved and added into the"MemZone" memory zone.• the "RPT_MemZoneReport" report is displayed in a PDF file.• the "MemZone" memory zone is destroyed.Part 1: Report editor 127

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!