1 / 9

Control Breaks

Objectives. Understand control break logicPerform single-level control breaksUse control data within a heading in a control break moduleUse control data within a footer in a control break modulePerform control breaks with totalsPerform multiple-level control breaksPerform page breaks. Understa

tabib
Download Presentation

Control Breaks

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


    1. Control Breaks

    2. Objectives Understand control break logic Perform single-level control breaks Use control data within a heading in a control break module Use control data within a footer in a control break module Perform control breaks with totals Perform multiple-level control breaks Perform page breaks

    3. Understanding Control Break Logic Control break—temporary detour in the logic of a program Control break program—when a change in the value of a variable initiates special actions or cause special or unusual processing to occur Control break report—report that lists items in groups, with each group followed by a subtotal Sort—put in ordr

    4. Single-level Control Break A break in the logic of the program that is based on the value of a single variable Control break field—a variable that holds the value that signals a break in a program

    5. Terms Footer—message that prints at the end of a page or other section of a report Rolling up the totals—adding a total to a higher-level total

    6. Performing Multiple-level Control Breaks Summary report—no information about individual records, but instead includes only group totals Multiple-level control break—the normal flow of control breaks away to print totals in response to more than just one change in condition Major-level break—a break caused by a change in the value of a higher-level field Minor-level break—a break caused by a change in the value of a lower-level field

    7. Tasks to Complete where you need Control Break Routines Performing the lower-level break Performing any control break processing for the previous group Rolling up the current-level totals to the next higher level Resetting the current level’s totals to zero Performing any control break processing for the new group Updating the control break field

    8. Summary A control break is a temporary detour in the logic of a program You use a control break field to hold data from a previous record Sometimes, you need to use control data within a control break module A control break report contains and prints totals for the previous group, rolls up the current-level totals to the next higher level, resets the current level’s totals to zero, performs any other needed control break processing, and updates the control break field

    9. Summary (con’t) In a program containing a multiple-level control break, the normal flow of control breaks away for special processing in response to a change in more than one field. Every time you write a program in which you need control break routines, you should check whether you need to perform certain tasks To perform page breaks, you count the lines printed and pause to print headings when the counter reaches some predetermined value

More Related