SlideShare ist ein Scribd-Unternehmen logo
1 von 9
Tutorial for Oracle10g Forms/Reports




Lesson 3

In this lesson, you will learn how to:

       Create Alerts (a modal window) on a push button that will function as a warning or a message
   to the users when they click the button.

      Create Procedures which are stored blocks of code which can be called from multiple objects
   saving the time taken for retyping codes

Creating an Alert

   1. Go to Alerts in the Object Navigator and double click on it.
   2. Double click on the newly created alert and name it DELETE_ALERT.
3. Now double click on the alert and you will immediately go to its Property Palette. In the
   properties:

   Change the title of the alert to Delete Alert, and Name to Delele_Alert.

   Type in the message as "Are you sure you want to Delete?"

   Select Stop as the Alert style

   You can add a third button to the alert or just keep the OK and Cancel
Make sure that Button1 is selected as the default button




4. To activate the alert, we will create a procedure which we will call from the delete button. To
   add a procedure, go to the Object Navigator and double click on Program Units. Immediately
   the window for the new Program unit will appear.
5. In the window for the new Program Unit, type in the name as Display_Delete-Alert. Make sure
   that procedure is selected as the type of Program Unit and click OK.




6. Once you click OK, you will be automatically taken to the PL/SQL Editor window.
7. In the PL/SQL Editor, type in the following code for activating the alert. You may have to
   delete a couple of lines from the Editor to avoid duplication. In this code, we will declare a
   number variable called return_alert. We will then set it to show the alert that we created
   earlier in this lesson called Delete_Alert. We will then write a simple if/then statement, such
   that if the user clicks on OK, which is alert button 1, then 10g Forms/Reports will perform the
   deletion and commit the changes. Otherwise, it will exit the alert window and help the users
   decide on their action. (See the following to get a view of the code as it should look in the
   PL/SQL editor. Do not forget to compile.)
8. We will now add a push button to the form and then add the above procedure to it, so that
   whenever the user clicks on delete, the alert will be shown. To do this, go the Layout Editor by
   double-clicking Canvas icon and add a push button to the form, go its properties, and change
   the label to Delete (use the steps used to create a push button in Lesson 2). Now go to its
   PL/SQL Editor by right clicking on the push button.
9. At the When-Button-Pressed trigger in the PL/SQL Editor, write the following code:

                               delete from student
                               where studid = :student.studid;
                               delete_record;
                               Display_Delete_Alert;

10.The last line of the code will call the previously created procedure Display_Delete_Alert and
   activate the alert whenever the user clicks on the delete button. The first two lines of code
   delete the record for any particular student ID.
11.Then click Run Form.
Lesson Summary

In this lesson you have learned how to:

      Create alerts on push buttons (delete) so that when the user clicks on the button the alert is
   shown as a warning

      Create procedures or stored blocks of code that can be called from any object
Next you will learn how to create reports. To do this, proceed to Lesson 4

Weitere ähnliche Inhalte

Andere mochten auch

Empowering a new creative generation. Continuity Forum 2014
Empowering a new creative generation. Continuity Forum 2014 Empowering a new creative generation. Continuity Forum 2014
Empowering a new creative generation. Continuity Forum 2014 Yonatan Raz-Fridman
 
OpenDataHK Meetup 13 June 2013 What is Open Data?
OpenDataHK Meetup 13 June 2013 What is Open Data? OpenDataHK Meetup 13 June 2013 What is Open Data?
OpenDataHK Meetup 13 June 2013 What is Open Data? Mr. Bill Proudfit
 
Spanishisdifferent
SpanishisdifferentSpanishisdifferent
Spanishisdifferentguest26f314
 
32 Ways a Digital Marketing Consultant Can Help Grow Your Business
32 Ways a Digital Marketing Consultant Can Help Grow Your Business32 Ways a Digital Marketing Consultant Can Help Grow Your Business
32 Ways a Digital Marketing Consultant Can Help Grow Your BusinessBarry Feldman
 

Andere mochten auch (8)

Tutorials2
Tutorials2Tutorials2
Tutorials2
 
Empowering a new creative generation. Continuity Forum 2014
Empowering a new creative generation. Continuity Forum 2014 Empowering a new creative generation. Continuity Forum 2014
Empowering a new creative generation. Continuity Forum 2014
 
OpenDataHK Meetup 13 June 2013 What is Open Data?
OpenDataHK Meetup 13 June 2013 What is Open Data? OpenDataHK Meetup 13 June 2013 What is Open Data?
OpenDataHK Meetup 13 June 2013 What is Open Data?
 
Spanishisdifferent
SpanishisdifferentSpanishisdifferent
Spanishisdifferent
 
Smithie
SmithieSmithie
Smithie
 
Tuotorials
TuotorialsTuotorials
Tuotorials
 
Parents
ParentsParents
Parents
 
32 Ways a Digital Marketing Consultant Can Help Grow Your Business
32 Ways a Digital Marketing Consultant Can Help Grow Your Business32 Ways a Digital Marketing Consultant Can Help Grow Your Business
32 Ways a Digital Marketing Consultant Can Help Grow Your Business
 

Ähnlich wie Tutorials3

10.USING THE ECLIPSE DEBUGGERupdated 8618This t.docx
10.USING THE ECLIPSE DEBUGGERupdated 8618This t.docx10.USING THE ECLIPSE DEBUGGERupdated 8618This t.docx
10.USING THE ECLIPSE DEBUGGERupdated 8618This t.docxpaynetawnya
 
Software engineering modeling lab lectures
Software engineering modeling lab lecturesSoftware engineering modeling lab lectures
Software engineering modeling lab lecturesmarwaeng
 
Android notifications. testing guideline
Android notifications. testing guidelineAndroid notifications. testing guideline
Android notifications. testing guidelineTechMagic
 
Super components en Pascal
Super components en PascalSuper components en Pascal
Super components en PascalPaco Miró
 
Gui builder
Gui builderGui builder
Gui builderlearnt
 
Newsletter Popup User Guide (Full version)
Newsletter Popup User Guide (Full version)Newsletter Popup User Guide (Full version)
Newsletter Popup User Guide (Full version)Magebuzz
 
MobileAppDev Handout#6
MobileAppDev Handout#6MobileAppDev Handout#6
MobileAppDev Handout#6trupti1976
 
Diving into VS 2015 Day5
Diving into VS 2015 Day5Diving into VS 2015 Day5
Diving into VS 2015 Day5Akhil Mittal
 
Getting started with code composer studio v3.3 for tms320 f2812
Getting started with code composer studio v3.3 for tms320 f2812Getting started with code composer studio v3.3 for tms320 f2812
Getting started with code composer studio v3.3 for tms320 f2812Pantech ProLabs India Pvt Ltd
 
I need some help answering these three questions listed below.1. A.pdf
I need some help answering these three questions listed below.1. A.pdfI need some help answering these three questions listed below.1. A.pdf
I need some help answering these three questions listed below.1. A.pdfarjunstores123
 
Debugger & Profiler in NetBeans
Debugger & Profiler in NetBeansDebugger & Profiler in NetBeans
Debugger & Profiler in NetBeansHuu Bang Le Phan
 
Lession 2 starting with mssqlserver
Lession 2 starting with mssqlserverLession 2 starting with mssqlserver
Lession 2 starting with mssqlserverĐỗ Đức Hùng
 
Micro station v8 manual
Micro station v8 manualMicro station v8 manual
Micro station v8 manualyuri30
 

Ähnlich wie Tutorials3 (20)

10.USING THE ECLIPSE DEBUGGERupdated 8618This t.docx
10.USING THE ECLIPSE DEBUGGERupdated 8618This t.docx10.USING THE ECLIPSE DEBUGGERupdated 8618This t.docx
10.USING THE ECLIPSE DEBUGGERupdated 8618This t.docx
 
Software engineering modeling lab lectures
Software engineering modeling lab lecturesSoftware engineering modeling lab lectures
Software engineering modeling lab lectures
 
Android notifications. testing guideline
Android notifications. testing guidelineAndroid notifications. testing guideline
Android notifications. testing guideline
 
Logical Triggers.pdf
Logical Triggers.pdfLogical Triggers.pdf
Logical Triggers.pdf
 
Super components en Pascal
Super components en PascalSuper components en Pascal
Super components en Pascal
 
VBA Tips
VBA TipsVBA Tips
VBA Tips
 
Introduction
IntroductionIntroduction
Introduction
 
Gui builder
Gui builderGui builder
Gui builder
 
Newsletter Popup User Guide (Full version)
Newsletter Popup User Guide (Full version)Newsletter Popup User Guide (Full version)
Newsletter Popup User Guide (Full version)
 
MobileAppDev Handout#6
MobileAppDev Handout#6MobileAppDev Handout#6
MobileAppDev Handout#6
 
Diving into VS 2015 Day5
Diving into VS 2015 Day5Diving into VS 2015 Day5
Diving into VS 2015 Day5
 
Getting started with code composer studio v3.3 for tms320 f2812
Getting started with code composer studio v3.3 for tms320 f2812Getting started with code composer studio v3.3 for tms320 f2812
Getting started with code composer studio v3.3 for tms320 f2812
 
Intake 38 9
Intake 38 9Intake 38 9
Intake 38 9
 
I need some help answering these three questions listed below.1. A.pdf
I need some help answering these three questions listed below.1. A.pdfI need some help answering these three questions listed below.1. A.pdf
I need some help answering these three questions listed below.1. A.pdf
 
iOS Development (Part 2)
iOS Development (Part 2)iOS Development (Part 2)
iOS Development (Part 2)
 
Debugger & Profiler in NetBeans
Debugger & Profiler in NetBeansDebugger & Profiler in NetBeans
Debugger & Profiler in NetBeans
 
Android action bar and notifications-chapter16
Android action bar and notifications-chapter16Android action bar and notifications-chapter16
Android action bar and notifications-chapter16
 
Lession 2 starting with mssqlserver
Lession 2 starting with mssqlserverLession 2 starting with mssqlserver
Lession 2 starting with mssqlserver
 
Micro station v8 manual
Micro station v8 manualMicro station v8 manual
Micro station v8 manual
 
Les14
Les14Les14
Les14
 

Kürzlich hochgeladen

Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyKhushali Kathiriya
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherRemote DBA Services
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...apidays
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century educationjfdjdjcjdnsjd
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAndrey Devyatkin
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024The Digital Insurer
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CVKhem
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...DianaGray10
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobeapidays
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodJuan lago vázquez
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProduct Anonymous
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)wesley chun
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 

Kürzlich hochgeladen (20)

Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 

Tutorials3

  • 1. Tutorial for Oracle10g Forms/Reports Lesson 3 In this lesson, you will learn how to: Create Alerts (a modal window) on a push button that will function as a warning or a message to the users when they click the button. Create Procedures which are stored blocks of code which can be called from multiple objects saving the time taken for retyping codes Creating an Alert 1. Go to Alerts in the Object Navigator and double click on it. 2. Double click on the newly created alert and name it DELETE_ALERT.
  • 2. 3. Now double click on the alert and you will immediately go to its Property Palette. In the properties: Change the title of the alert to Delete Alert, and Name to Delele_Alert. Type in the message as "Are you sure you want to Delete?" Select Stop as the Alert style You can add a third button to the alert or just keep the OK and Cancel
  • 3. Make sure that Button1 is selected as the default button 4. To activate the alert, we will create a procedure which we will call from the delete button. To add a procedure, go to the Object Navigator and double click on Program Units. Immediately the window for the new Program unit will appear.
  • 4. 5. In the window for the new Program Unit, type in the name as Display_Delete-Alert. Make sure that procedure is selected as the type of Program Unit and click OK. 6. Once you click OK, you will be automatically taken to the PL/SQL Editor window.
  • 5. 7. In the PL/SQL Editor, type in the following code for activating the alert. You may have to delete a couple of lines from the Editor to avoid duplication. In this code, we will declare a number variable called return_alert. We will then set it to show the alert that we created earlier in this lesson called Delete_Alert. We will then write a simple if/then statement, such that if the user clicks on OK, which is alert button 1, then 10g Forms/Reports will perform the deletion and commit the changes. Otherwise, it will exit the alert window and help the users decide on their action. (See the following to get a view of the code as it should look in the PL/SQL editor. Do not forget to compile.)
  • 6. 8. We will now add a push button to the form and then add the above procedure to it, so that whenever the user clicks on delete, the alert will be shown. To do this, go the Layout Editor by double-clicking Canvas icon and add a push button to the form, go its properties, and change the label to Delete (use the steps used to create a push button in Lesson 2). Now go to its PL/SQL Editor by right clicking on the push button.
  • 7. 9. At the When-Button-Pressed trigger in the PL/SQL Editor, write the following code: delete from student where studid = :student.studid; delete_record; Display_Delete_Alert; 10.The last line of the code will call the previously created procedure Display_Delete_Alert and activate the alert whenever the user clicks on the delete button. The first two lines of code delete the record for any particular student ID. 11.Then click Run Form.
  • 8. Lesson Summary In this lesson you have learned how to: Create alerts on push buttons (delete) so that when the user clicks on the button the alert is shown as a warning Create procedures or stored blocks of code that can be called from any object
  • 9. Next you will learn how to create reports. To do this, proceed to Lesson 4