|
Introduction to PowerBuilder Exercises
You need to paint the following
DataWindows. The necessary details are listed below. Please don't skip these exercises.
You will be using them in your coming session, "PowerScript".
| Property |
Value |
| Data Source |
SQL SELECT |
| Presentation Style |
Tabular |
| Tables |
units |
| Columns |
All |
| Data Source definition |
SELECT
"units"."unit",
"units"."unit_description"
FROM "units" ORDER BY "units"."unit" |
| Other issues: |
-None- |
| Property |
Value |
| Data Source |
SQL SELECT |
| Presentation Style |
Tabular |
| Tables |
units |
| Columns |
All |
| Data Source definition |
SELECT
"units"."unit",
"units"."unit_description"
FROM "units"
ORDER BY "units"."unit" |
| Other issues: |
Remove headings from the
header band and move the header band all the way up. |
| Property |
Value |
| Data Source |
SQL SELECT |
| Presentation Style |
Free Form |
| Tables |
product_master |
| Columns |
All |
| Data Source definition |
SELECT
"product_master"."product_no",
"product_master"."product_description",
"product_master"."product_balance",
"product_master"."product_reorder_level",
"product_master"."product_measuring_unit"
FROM "product_master"
ORDER BY "product_master"."product_no" |
| Other issues: |
Set
product_measuring_unit edit style to DDDW ( d_units_dropdown ) |
| Property |
Value |
| Data Source |
SQL SELECT |
| Presentation Style |
Free Form |
| Tables |
product_master |
| Columns |
All |
| Data Source definition |
SELECT
"product_master"."product_no",
"product_master"."product_description",
"product_master"."product_balance",
"product_master"."product_reorder_level",
"product_master"."product_measuring_unit"
FROM "product_master"
WHERE "product_master"."product_no" = :a_product_no |
| Other issues: |
:a_product_no is a
retrieval argument. Screen is same as "d_product_custom_query" DataWindow. Set
product_measuring_unit edit style to DDDW ( d_units_dropdown ). |
| Property |
Value |
| Data Source |
SQL SELECT |
| Presentation Style |
Tabular |
| Tables |
product_master |
| Columns |
All |
| Data Source definition |
SELECT
"product_master"."product_no",
"product_master"."product_description",
"product_master"."product_balance",
"product_master"."product_reorder_level",
"product_master"."product_measuring_unit"
FROM "product_master"
ORDER BY "product_master"."product_no" |
| Other issues: |
Set
product_measuring_unit edit style to DDDW ( d_units_dropdown ). |
| Property |
Value |
| Data Source |
SQL SELECT |
| Presentation Style |
Tabular |
| Tables |
trans |
| Columns |
tran_no, tran_date,
tran_type |
| Data Source definition |
SELECT
"trans"."tran_no",
"trans"."tran_date",
"trans"."tran_type"
FROM "trans" |
| Other issues: |
Set the edit style of
'tran_date' to EditMask. |
| Property |
Value |
| Data Source |
SQL SELECT |
| Presentation Style |
Tabular |
| Tables |
trans |
| Columns |
All, but delete the
following columns from the display.
tran_no, tran_date, tran_type |
| Data Source definition |
SELECT
"trans"."tran_no",
"trans"."tran_date",
"trans"."tran_type",
"trans"."tran_serial_no",
"trans"."tran_item_no",
"trans"."tran_qty"
FROM "trans" |
| Other issues: |
-None- |
| Property |
Value |
| Data Source |
SQL SELECT |
| Presentation Style |
Crosstab |
| Tables |
product_master, trans |
| Columns |
tran_qty, tran_date from
"trans" table. "product_description" from "product_master"
table |
| Data Source definition |
SELECT
"product_master"."product_description",
"trans"."tran_date", "trans"."tran_qty"
FROM "product_master", "trans"
WHERE ( "trans"."tran_item_no" =
"product_master"."product_no" ) and
((month( "trans"."tran_date" ) = :a_month ) AND
( year( "trans"."tran_date" ) = :a_year ) AND
( "trans"."tran_type" = :a_tran_type ) ) |
| Other issues: |
Join two tables on
"product_no". The retrieval arguments are :a_month, :a_year and :a_tran_type.
Datatype of the first two is number and the last one is a string. |
| Property |
Value |
| Data Source |
External |
| Presentation Style |
FreeForm |
| Tables |
-Not applicable- |
| Columns |
See the picture |
| Data Source definition |
See
the picture |
| Other issues: |
-None- |
Design View Screen Shot:
|