add

About Me

My photo
Oracle Apps - Techno Functional consultant

Wednesday, September 21

19/23 FORMS - Viewing a picture using BLOB datatype

Introduction

Since you had inserted the employee pictures into the EMP table successfully (from PL/SQL hands-on), now the organization wants to view the pictures that were inserted.

You have been assigned to develop an application form to display all of the employee information plus their pictures.

Open a Module

In the ‘Object Navigator’ window, highlight the default Form name (MODULEnn). Highlight the name and click on the form name and change the color to blue. Then type "EMPLOYEE_DATA" as the form name.

Save a Module

Go to the Main menu and choose “File,” then select “Save as.” In the ‘Save As’ window, save the form in the ISELF folder.

Create a Data Block

In the ‘Object Navigator’ window, highlight "Data Blocks,” and click on the "create” icon. The ‘Create’ icon is in the vertical tool bar in the ‘Object Navigator’ window. It is a green ‘+’ sign. If you drag your cursor on the icon a tooltip will show ‘Create.’

Choose a New Data Block

In the ‘New Data Block’ window, choose the default option “Data Block Wizard” and click "OK."

Welcome Data Block

In the ‘Welcome Data Block Wizard’ window, click “NEXT.”


Type of Data Block

Select the type of data block you would like to create by clicking on a radio button. Select the default option ‘Table or View’ and then click “NEXT” again.

Selecting Table

Click on “browse.” In the ‘Tables’ window, highlight the EMP table; then click the "OK" push button.

Selecting columns for the Data Block Wizard

To choose all columns, click on the two arrow signs in the ‘Data Block Wizard’ window. To choose selected columns, click on the one arrow sign. For this hands-on exercise select all columns, and click “Next.”

Layout Wizard

End of the Data Block Wizard and beginning of the Layout Wizard

In the ‘Congratulations’ screen, use the default checkmark radio button (Create the data block, then call the Layout Wizard), and click "Finish." You can also use the Data Block Wizard to modify your existing data block. Simply select the data block in the Object Navigator and click the Data Block Wizard toolbar button, or choose ‘Data Block wizard’ from the ‘Tools’ menu.

Welcome screen

In the ‘Welcome to the Layout Wizard’ window, click ”Next.”


Selecting canvas

In the ‘Layout Wizard’ window, select the "new canvas" option. Canvas is a place that you will have your objects such as columns, titles, pictures, etc. If you have already have your canvas, select the canvas and then click on the Next push button.

Select "content," then click “Next.”


Selecting Columns for the Layout Wizard

In the ‘Layout Wizard’ window, select all the columns. These are the columns that you want to display them on the canvas. Then click “Next.”

Change your objects appearances

Change size or prompt if needed. In this window, you can enter a prompt, width, and height for each item on the canvas. You can change the measurement units. As a default the default units for item width and height are points. You can change it to inch or centimeter. When you change size, click “Next.”

Selecting a layout style

Select a layout style for your frame by clicking a radio button. Select "Form," if you want one record at a time to be displayed. Select “Tabular,” if you want more than one record at a time to be displayed. Select "Forms," and then click “next.”

Record layout

Type the ‘Frame Title’ (Employee Data Information), ‘Records Displayed’, ‘Distance between Records’ values and checkmark the ‘Display Scrollbar’ box, when you use multiple records or the ‘Tabular’ option. Then click “Next.”

Congratulation Screen

In the ‘Congratulations’ window, click "Finish."

Resize an object
You can resize the photo image as needed. You know how big your original picture is. If the box is too small, you may only see a part of the picture and not the whole.

Run the Form
Run the application form and maximize the "Forms Runtime" window.

Execute Query
Click on the "Execute Query" icon to display an employee record. Navigate through your application. Notice that we only added pictures to the first two employees in the employee table. You added picture in the PL/SQL hands-on.

Exit the form
Exit the Runtime form.

Go to the "Object Navigator" windows and highlight the "EMPLOYEE_DATA" Form to save it. Go to Main menu, choose the File sub-menu, and select the Save option.

Save the "EMPLOYEE_DATA" form in the ISLEF folder.

Questions:

Q: Describe the BLOB datatype.

Q: How do you create an item containing picture in a canvas?

Q: Since you had inserted the employee pictures into the EMP table successfully (from PL/SQL hands-on), now the organization wants to view the pictures that were inserted.

You have been assigned to develop an application form to display all of the employee information plus their pictures.

No comments: