Tutorial for Oracle10g Forms / Reports (Version 3.0)
by: David Zhu (IT Analyst) Reviewed by: Joe Callaghan
School of Business Administration Administration
Oakland University Rochester, MI 48309-4401
March. 2006
Prerequisite: You have an Oracle account on Oracle server and you have Oracle 10g Developer Suite installed and configured to the Oracle10G Server on your workstation. You have created a Student table (FTPT_STATUS, MAJOR, SEX, START_SEM, START_YEAR, STUDNAME) in Oracle database by using Oracle10g Designer or SQL*Plus. You have basic PL*SQL knowledge.
Lesson 1 In this lesson you will learn: What is Oracle10g Oracle 10g Forms/Reports Tools provided by Oracle10g Oracle10g Forms/Reports to create Forms and Reports How to log on to Oracle10g Oracle 10g Forms/Reports Create your first block and form based on your Student table t able
What Is Oracle 10g Forms/Reports? Oracle10g Oracle10g Forms/Reports is an Oracle tool that helps you to create webenabled forms and reports based on the tables that you have created using Oracle10g Oracle10g Designer or SQL Plus commands. Starting from Oracle10g Oracle10g,, Oracle10g Oracle10g Forms/Reports has become one of Oracle10g Oracle 10g Developer Suite components. You can use Oracle10g Oracle10g Forms/Reports to: Design and customize your forms and reports. Add various functionality, like radio buttons, combo boxes, and list of values to make your forms and reports more user friendly. Write triggers on your objects to add functionality to them and capture errors. Web enable your Forms or Reports on a development server.
Tools Provided By Oracle10g Forms/Reports Oracle Oracle10g Oracle10g Forms/Reports provides four tools: Object Navigator: In this tool you can view all your objects, add new objects and name/rename your objects. Layout Editor: This tool helps you design your forms and reports and add various objects to them like push buttons and list boxes. PL/SQL Editor: This is the tool that is used to write all t he codes for the triggers, procedures or functions. Menu Editor: This tool will help you create a customized menu that can be attached to your form or report.
Logging On to Oracle10g Forms/Reports 1.
To log log on on to Oracl Oracle1 e10g 0g Form Forms/ s/Re Repo ports rts,, go go to to Sta Start rt Prog Progra rams ms Oracle10g Oracle10g Developer Suite Forms Developer, click Start OC4J Instance (Very important: You must keep OC4J running while using Oracle10g Forms/Repo Forms/Reports rts !!!), after OC4J initialized, then click Forms Builder.
2. Immediatel Immediately, y, you you will see see the window window for for Forms Forms Builder: Builder:
3. Double click click Data Blocks Blocks,, Select Select 'Use the Databloc Datablock k Wizard' and and click OK--This is the easiest method to design a new form.
4. You will will now see the Welcome Welcome to the Datablo Datablock ck Wizard Wizard Window. Window. Click Next to proceed.
5. You will will now see the window window for the Databloc Datablock k Wizard. Select Select Table Table or View as in the figure and click Next.
6. You will will now see the window that that prompts prompts you you to select select a table table or a view--your form will be created based on this selection. Since no table or view is being shown, click on browse to look at the list of tables and views in your database.
7. Once you you click browse, browse, the the connect connect window will will appear. appear. Type Type in your username, password and database to connect to the database.
8. You will will now see the tables window. window. Select Select current current users users and tables tables and click OK.
9. You will will now see the list of tables tables created created in your your database. database. Select Select Students and click OK.
10.You will now see your selected table and its available columns on your screen. Click on the single right arrow to select the first column to be shown in your form; in this case the STUDID column. You will now see this column under the database items selected sub-window.
11.To 11. To move the rest of the columns, simply click on the double r ight arrow and this will select all your columns in to the database items.
12.You will now see the Congratulations window. Make sure that "Create the data block, then call the Layout Wizard" is selected and click on Finish.
13.You will now see the Layout Wizard Welcome window, click next. You will see the following screen, click next.
14. select the items that you would like to show in the form. Make sure that the data block selected is Students and then click the double right arrow to move all the columns of the Student block from the available items to the displayed items. Click on Next to continue.
15.The window with the prompt for the height and width of the items will appear. Click Next to accept the default values.
15.The Layout Wizard will now prompt you to select the layout or view style of your block. Select Form and click Next.
16.The Layout Wizard will now prompt you to select a title for the form that you are creating. Type in Student Records. Click Next to continue.
17.Congratulations! You have now successfully created your first form. Click Finish to view your form.
18.You 18. You will now see the canvas view of the form that you have created. You can now add various objects like push buttons, combo boxes and radio buttons to your form to make it more graphical and user friendly. We will do this in the next lesson.
19.You 19. You can now format the form manually. Click on the frame to select it. Then drag the frame to make it bigger.
20.You 20. You can now space out the data fields to make your form more visually appealing. You can do this by simply selecting the data field and dragging it to your desired area.
21.After 21. After you have formatted all the data fields, your form should look like the following:
Lesson Summary In this lesson you have learned: What is Oracle10g Oracle 10g Forms/Reports Tools provided by Oracle10g Oracle10g Forms/Reports to create Forms and Reports How to log on to Oracle10g Oracle 10g Forms/Reports To create a data block To create a basic form based on a table that you had created. How to view your form in the canvas. Next, you will learn to add more objects and functionality to your basic form. For this, proceed to Lesson 2.