Home » Developer & Programmer » Forms » Master Details Form..
Master Details Form.. [message #583875] Mon, 06 May 2013 07:03 Go to next message
mist598
Messages: 1195
Registered: February 2013
Location: Hyderabad
Senior Member
Hello everybody!

Master Details b/w Dept and Emp tables and in Dept table ,when i enter the Dname and press the 'GO' Button ,then only display Employees Details , so, please help me..


Thanks,
Re: Master Details Form.. [message #583876 is a reply to message #583875] Mon, 06 May 2013 07:14 Go to previous messageGo to next message
Littlefoot
Messages: 21813
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Follow Forms' Data Block Wizard. It will do the whole job for you, so you won't have to code anything (not even that "GO" button).

Use built-in Forms functionality as much as possible as it'll save you (and us) headache in the future.
Re: Master Details Form.. [message #583879 is a reply to message #583876] Mon, 06 May 2013 07:40 Go to previous messageGo to next message
mist598
Messages: 1195
Registered: February 2013
Location: Hyderabad
Senior Member
Thanks,

Ok,But here in Dept table ,I take Two Fields Deptno,Dname and here i enter Dname and Click on Button ,display details about employees and along with deptno in Dept Table also...

Please Help me..
Re: Master Details Form.. [message #583882 is a reply to message #583879] Mon, 06 May 2013 07:53 Go to previous messageGo to next message
Littlefoot
Messages: 21813
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
I tried to help, but you refuse to listen what I say.
  • create master (DEPT) block
  • create detail (EMP) block. Carefully read what Wizard asks. Correctly set relationship between master and detail block (it is the DEPTNO column)
  • run a form
  • enter department name into an item in the master block
  • execute query
  • information about department (in the master block), as well as information about employees in the detail block, will be displayed on the screen
Re: Master Details Form.. [message #583886 is a reply to message #583882] Mon, 06 May 2013 08:50 Go to previous messageGo to next message
mist598
Messages: 1195
Registered: February 2013
Location: Hyderabad
Senior Member
I am sorry Littlefoot..

I tried what you are said and i got it also,But i want a button ,when button pressed only display details..

Thanks in advance...
Re: Master Details Form.. [message #583888 is a reply to message #583886] Mon, 06 May 2013 09:18 Go to previous message
Littlefoot
Messages: 21813
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Not that you can't do that - surely you can, but it makes things much more complex, and you gain absolutely NOTHING.
Is master block data block or control block? Depending on that, you will (or will not) have to enter query mode first.

Is detail block data block or not? Depending on that, you'll populate that block, either by executing a query (you might have to set block's ONETIME_WHERE or DEFAULT_WHERE property, or use PRE-QUERY trigger to restrict data to be fetched) or, for example, using a loop. Note that the latter option implies that values you "retrieved" Forms considers to be NEW records so - if you change any value and want to save it - Forms will perform INSERT instead of UPDATE and you'll get DUP-VAL-ON-INDEX. Then you'll have to develop logic to avoid such faulty behavior.

If it is a control block, you can't execute query anyway so you'll have to populate it somehow (a loop, as I said). As there's no mapping between control block items with table columns, you'll have to write your own code for inserting, updating and deleting values.

Therefore, go ahead, happy programming - I hope that a "GO button form" will work much better than the one Forms creates for you in a matter of several minutes.
Previous Topic: map excel columns on oracle forms and insert it into database
Next Topic: for spell check need to switch window
Goto Forum:
  


Current Time: Wed Jul 03 10:16:24 CDT 2024