master details [message #512323] |
Sun, 19 June 2011 02:36 ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
![](http://www.gravatar.com/avatar/892fd9ad41ffae42e983a9dc95b2cd72?s=64&d=mm&r=g) |
omernas
Messages: 3 Registered: June 2011 Location: sudan
|
Junior Member |
|
|
i'm doing a inventory system from a book.. in the master details forms the number of columns is more than the number of columns in the table. how is that?
in the maintenance form, the maint table is the master which have 4 columns maintcode,manitname,desc and recvdate. and the maintsitem table is the detail which have 4 coulmns maintcode,itemcode,amount and numbertes.
in the form the master block which is form type, have 4 texts, and the detail block which is tabular type have 8 texts there are extra columns quantity,item model,maintenance, and total, where did these columns come from? are they added manually? if yes how i'm going to deal with them..
thank you in advance..
|
|
|
Re: master details [message #512347 is a reply to message #512323] |
Sun, 19 June 2011 09:19 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
![](http://www.orafaq.com/forum/images/custom_avatars/72104.gif) |
Littlefoot
Messages: 21818 Registered: June 2005 Location: Croatia, Europe
|
Senior Member Account Moderator |
|
|
It is difficult to guess. You said you used "a book". Which one? I most probably don't have it, but someone might; you should have provided some more details.
It is a common practice to create a block that contains more items that number of columns in a table. For example: there's the ITEMCODE column in a table. If you created a form that displays just that column, and knowing that a "code" can look quite unreadable (such as "12887563" or "AX9982-33" or similar), people create additional (display) item (ITEM_NAME) which is NOT contained in that table, but in another one. You then fill its value using different triggers (such as POST-QUERY while querying existing data or WHEN-VALIDATE-ITEM when inserting new information).
I don't know how these additional items were created, but you might find that out by checking their properties, as well as detail block's properties. Block is most probably created in the "detail" table, but - maybe it is not. Maybe its data source is a view (or something different, such as a procedure or a FROM clause). Items' properties will discover whether these items belong to a table or not.
Anyway: you should do some investigation. If you have additional questions, feel free to ask. I hope someone will be able to assist.
|
|
|
|
Re: master details [message #512417 is a reply to message #512395] |
Mon, 20 June 2011 04:32 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) |
cookiemonster
Messages: 13937 Registered: September 2008 Location: Rainy Manchester
|
Senior Member |
|
|
You can add items for them. You would set the database_item property of these items to No.
You'd then populate them in the post-query trigger and the approprite when-validate-item trigger.
So if you've got an itemcode in the block and want to display the itemname, you would add a non-database item for itemname and
write a select statement to populate it in the when-validate-item trigger on itemcode.
You would put the same select in the post-query trigger so that it's populated when you query records.
|
|
|