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

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

3.2.2 CharacteristicsSearch keyA report based on a data file uses a search key. This key is used to browse the records that will be printed inthe report. This key is defined in the data file.Bounded reportA report based on a data file can be bounded on the search key used. For example, a report based on the"Customer" file can print all the customers or only the customers whose name starts with the letter "C" or "E"if the report is bounded.See the online help (keyword: "Bound, Bounds of a report") for more details.3.3 Report based on a query3.3.1 OverviewA query allows you to easily select records in one or more data files. A query can also be used to perform calculationson the selected data. You can, for example, select all the orders for the customers living in New Yorkand calculate the total amount of the orders for each customer.Using queries in a report allows you to easily create <strong>com</strong>plex reports. The query pre-selects all the records.The report organizes the selected data and performs the calculations.Caution: To optimize the print time, the calculations (totals on items for example) should be performed in thereport (and not in the query).Several modes can be used to create a report based on a query:• the query is created and saved in the query editor. Then, the report is based on the query file (".WDR" file).The query can be re-used in another report. The query can be modified at any time in the query editor. Thequery is an independent query.• the query is created when creating the report. The query is included in the report. No file specific to thequery is created. The query can only be modified from the report where it was created. It cannot be reusedin another report. The query is an embedded query.• the query is based on the data <strong>com</strong>ing from a connection (not available in WinDev Mobile). This type ofreport based on a query is kept for backward <strong>com</strong>patibility. See the online help for more details.Note: This type of report based on a query is available even if no analysis is associated with the WinDev/WebDev/WinDev Mobile project.Tip: In the query editor, is used to automatically create a report based on the current Select query.See “Report based on a query”, page 119 for more details.3.3.2 The different types of queriesReport based on an independent queryThe query must be created with the query editor before the report is created (see “How do I create a query?”,page 166 for more details). When creating the report, all you have to do is specify the name of the queryused.If the query is modified in the query editor (deletion of result items for instance), a synchronization screen isdisplayed when the query is closed. Therefore, the modifications performed on the query can be applied to allthe elements of the project that use this query (including reports). See “Consistency with the analysis”,page 202 for more details.Part 1: Report editor 45

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

Saved successfully!

Ooh no, something went wrong!