350 likes | 430 Vues
Week 5 February 22. Dealing with Errors and Problems OLE: Object Linking and Embedding Anatomy of a Report. Query 2 select manufacturer_name, manufacturer_code from manufacturers where manufacturer_code = :q1_manufacturer_code. Query 3
E N D
Week 5February 22 Dealing with Errors and Problems OLE: Object Linking and Embedding Anatomy of a Report
Query 2 select manufacturer_name, manufacturer_code from manufacturers where manufacturer_code = :q1_manufacturer_code Query 3 select product_code, product_description, retail_price from products where manufacturer_code = :q2_manufacturer_code Query 1 select manufacturer_name, manufacturer_code from manufacturers order by manufacturer_name
Launching a Query To begin a query, the form must first be in query mode
Ending a Form Without Entering a Query FRM-40353 Error
Overcoming Problems with Triggers • Maximize the MDI and form module windows • Enter query mode when the form is launched • Re-enter query mode after every query • Cancel the query if no query is entered when exiting the form • Suppress system alerts and messages
Add and program the WHEN-NEW-FORM-INSTANCE and WHEN-NEW-RECORD-INSTANCE triggers Because these triggers are at the top of the hierarchy, the will be executed first. Add and program the WHEN-MOUSE-CLICK trigger Note: This was taken from another form module
Local variables needed to capture the error code and launch the alert Prefix “A” for alert.
Eventually... Content canvas Tab canvas
Object Linking and Embedding (OLE) • Allows the developer to link or embed objects within other files objects • An object can be a document, spreadsheet, graphic (GIF, TIF, JPEG, etc.), etc.
OLE Architecture • Divides tools into OLE servers and containers • Server - an application that creates and serves OLE objects in other applications • Container - an application that provides facilities for creation, manipulation and storage of OLE objects
OLE Oracle Form Module Link Container (embedding) Excel (server) Spreadsheet (object)
Access • Activation - connecting to the server application and using its features to manipulate and display the object • In-place Activation • Activates within the container application • Focus on the object • External Activation (default) • Activates within the server application • Object updated upon close
Create the OLE Container Select the Property Palette OLE Container Create the OLE Container with the OLE button in the tool palette
Opening an Existing File Display an icon in the OLE container Select the file
During Runtime Double click on the icon Quick Time Player (designated Windows plug-in) launched to play the movie file
Principles of Design A report should... • Communicate information to the user • Be flexible to adapt to different needs, levels of experience and knowledge of the intended user • Be simple, and no simpler
Dimensions of a Report Page Line Column
Report Page Elements Date Processed 02/12/06 Page 2 Razorback Securities, Inc. Transaction Listing Date Acct. No.Trans Exch Security Shares Price 02/01/96 72150391 B NYSE 23046 Ford Motor 100 10 1/4 1,025.00 02/02/96 72150391 S NYSE 69247 Texas Instr 700 79 3/8 55.562.50 Total Amount Transacted: 56,587.50
Report Header Date Processed 02/12/06 Page 1 Razorback Securities, Inc. Transaction Listing Appears at the beginning of the report and only once.
Report Page Elements: Page Heading Date Processed 02/12/06 Page 2 Razorback Securities, Inc. Transaction Listing Date Acct. No.Trans Exch Security Shares Price 02/01/96 72150391 B NYSE 23046 Ford Motor 100 10 1/4 1,025.00 02/02/96 72150391 S NYSE 69247 Texas Instr 700 79 3/8 55.562.50 Appears on every page Total Amount Transacted: 56,587.50
Report Page Elements: Title Line Date Processed 02/12/06 Page 2 Razorback Securities, Inc. Transaction Listing Date Acct. No.Trans Exch Security Shares Price 02/01/96 72150391 B NYSE 23046 Ford Motor 100 10 1/4 1,025.00 02/02/96 72150391 S NYSE 69247 Texas Instr 700 79 3/8 55.562.50 Usually appears on every page Total Amount Transacted: 56,587.50
Report Page Elements: Headings Date Processed 02/12/06 Page 2 Razorback Securities, Inc. Transaction Listing Date Acct. No.Trans Exch Security Shares Price 02/01/96 72150391 B NYSE 23046 Ford Motor 100 10 1/4 1,025.00 02/02/96 72150391 S NYSE 69247 Texas Instr 700 79 3/8 55.562.50 Total Amount Transacted: 56,587.50
Report Page Elements: Body Date Processed 02/12/06 Page 2 Razorback Securities, Inc. Transaction Listing Date Acct. No.Trans Exch Security Shares Price 02/01/96 72150391 B NYSE 23046 Ford Motor 100 10 1/4 1,025.00 02/02/96 72150391 S NYSE 69247 Texas Instr 700 79 3/8 55.562.50 Detail line Total Amount Transacted: 56,587.50
Report Page Elements: Footings Date Processed 02/12/06 Page 2 Razorback Securities, Inc. Transaction Listing Date Acct. No.Trans Exch Security Shares Price 02/01/96 72150391 B NYSE 23046 Ford Motor 100 10 1/4 1,025.00 02/02/96 72150391 S NYSE 69247 Texas Instr 700 79 3/8 55.562.50 Total Amount Transacted: 56,587.50
Report Page Elements: Summary Date Processed 02/12/06 Page 2 Razorback Securities, Inc. Transaction Summary Total Amount Transacted: 2,333,875.00