Home » Developer & Programmer » Forms » Oracle forms (oracle forms6i)
Oracle forms [message #510140] Thu, 02 June 2011 10:42 Go to next message
rajendaroracle
Messages: 80
Registered: May 2011
Location: India
Member

Hi,

can we create two datablocks(header&line) based on one table in oracle forms.any way to create?i don't go for master-detail.always facing this issue.

regards,
rajendar
Re: Oracle forms [message #510142 is a reply to message #510140] Thu, 02 June 2011 10:46 Go to previous messageGo to next message
cookiemonster
Messages: 13917
Registered: September 2008
Location: Rainy Manchester
Senior Member
Probably. You'd have to explain the data structure before we can tell you how.
Re: Oracle forms [message #510160 is a reply to message #510142] Thu, 02 June 2011 11:50 Go to previous messageGo to next message
Littlefoot
Messages: 21806
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Rajendar
Always facing this issue

What issue?
Re: Oracle forms [message #510208 is a reply to message #510160] Thu, 02 June 2011 22:43 Go to previous messageGo to next message
rajendaroracle
Messages: 80
Registered: May 2011
Location: India
Member

can we create two datablocks(header&line) based on one table.
Re: Oracle forms [message #510223 is a reply to message #510208] Fri, 03 June 2011 00:11 Go to previous messageGo to next message
Littlefoot
Messages: 21806
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Yes.

[EDIT] However, I prefer to call them "master" and "detail" instead of "header" and "line" (never even heard of such a terminology within Oracle Forms).

[Updated on: Fri, 03 June 2011 00:12]

Report message to a moderator

Re: Oracle forms [message #510224 is a reply to message #510223] Fri, 03 June 2011 00:22 Go to previous messageGo to next message
rajendaroracle
Messages: 80
Registered: May 2011
Location: India
Member

I know master-detail but according to my requirement i have only one custom table so based on that i need to create.you said it is possible how? If i have multiple rows then in line level?

[Updated on: Fri, 03 June 2011 00:25]

Report message to a moderator

Re: Oracle forms [message #510232 is a reply to message #510224] Fri, 03 June 2011 01:32 Go to previous messageGo to next message
Littlefoot
Messages: 21806
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Example based on Scott's EMP table:

  • using Data Block Wizard, create a master block. Its base table is EMP, the only column you'll choose is DEPTNO
  • create its layout - form style (which means that you'll see only one item on a canvas)
  • create another block (using Data Block Wizard again). It will be a detail block.
  • Its base table is EMP again. This time select ALL items.
  • Create master-detail relationship (manually, within the Wizard) by joining DEPTNO items from both blocks
  • layout should be "tabular"; display as many records as you wish (10, for example)
  • run the form. While in master block, perform query. It (master block) will contain 14 records (if the EMP table is the "original" one), and you'll scroll through 14 DEPTNO values (some of them will be duplicate, of course). Detail records will automatically change, as you scroll through master records

That should be all, I suppose.
Re: Oracle forms [message #593077 is a reply to message #510232] Tue, 13 August 2013 20:45 Go to previous messageGo to next message
sumanthllr
Messages: 15
Registered: April 2013
Junior Member
In this case can we organize in Oracle Applications Form as
Deptno   20
Sal      3000

Empno   Ename    
7369    SMITH 
7566    JONES   
7788    SCOTT


The above all are text items the master block has Deptno and Sal.
The detail block has Empno, Ename, Deptno, Sal.
The detail block should display multiple records.
The relation is the Deptno
Based on the Deptno,Sal the details should be queried as well as when key in the new data it stores multiple records like..

Empno   Ename   Sal   Deptno
null    null    3000  20
7369    SMITH   null  20
7566    JONES   null  20
7788    SCOTT   null  20


How to get rid of multiple records?
Re: Oracle forms [message #624248 is a reply to message #593077] Fri, 19 September 2014 08:17 Go to previous messageGo to next message
sampathkore4444@gmail.com
Messages: 8
Registered: January 2014
Junior Member
If we create like how Littlefoot explained, will it work? In my case, i have four blocks based on a single table. Based on one column in Block1, one of BLOCKS (BLOCK2, BLOCK3, BLOCK4) will get enabled. So should i go like how LittleFoot explained or any other way? Please help me in this regard.
Re: Oracle forms [message #624269 is a reply to message #624248] Fri, 19 September 2014 14:38 Go to previous message
Littlefoot
Messages: 21806
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
As it takes MINUTES to create a sample form based on Scott's tables, I hope you took that effort and checked whether it works or not. Because, it's been 6 hours between you posted a question & me seeing it.
Previous Topic: frm-40735 unhandled exception ora-01403 with the date column
Next Topic: where clause in the button for Database items
Goto Forum:
  


Current Time: Thu Mar 28 07:55:35 CDT 2024