Home » Developer & Programmer » Forms » Master Detail Relation
Master Detail Relation [message #637860] Thu, 28 May 2015 00:55 Go to next message
Nasir.azeem
Messages: 40
Registered: September 2014
Location: Karachi
Member
Hi Expert !
I create a form. i am using a table FIN_MTJV_HDR(mater table) & FIN_MTJV_DTL (detail table).
i am using FIN_MTJV_DTL (detail table) 2 times. 1 for debit entries and 2 time for credit entries. 2nd time name is FIN_MTJV_DTL1 (detail table).
and create relation with FIN_MTJV_HDR(mater table) respectively. But when i create record and execute query.
so first record execute all blocks but second record only execute in master block and last FIN_MTJV_DTL1 (detail table for credit entries).
My center block FIN_MTJV_DTL (detail table) not showing any entry after first record. However data available in database.Another side my last block FIN_MTJV_DTL1 perform perfectly.

first & second record snap shot attached

Regard
Nasir Azeem.

[Updated on: Thu, 28 May 2015 00:58]

Report message to a moderator

Re: Master Detail Relation [message #637861 is a reply to message #637860] Thu, 28 May 2015 01:08 Go to previous messageGo to next message
Littlefoot
Messages: 21807
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
How many tables do you really have? Two or three? FIN_MTJV_HDR is one of them - a master table. The next two data blocks are created on ... what? One or two tables? The first detail block ("Debit Account") is based on FIN_MTJV_DTL. What is a base table for the "Credit Account" data block? FIN_MTJV_DTL or FIN_MTJV_DTL1? What does that "1" stand for?

If you used Data block wizard, it created relations, triggers and procedures which make querying possible. As it works for the first queried master record, why wouldn't it work for any subsequent master record?

What happens if you manually navigate to the "Debit Account" data block and execute query in there (for the master record displayed on the screenshot)? Does the record appear in that block?
  • If not, well, there aren't any detail records there (although you said they are; are all changes committed?). Or, there might be a WHERE clause set in data block's Property palette which prevents records to be displayed.
  • If yes, there might be some problems in querying triggers/procedures.If that's the case, try to run a form in debug mode, trace its execution and see what's going on.
Re: Master Detail Relation [message #637862 is a reply to message #637861] Thu, 28 May 2015 01:15 Go to previous messageGo to next message
Nasir.azeem
Messages: 40
Registered: September 2014
Location: Karachi
Member
i have 3 table i am using FIN_MTJV_DTL 2 times.
1)FIN_MTJV_HDR
2)FIN_MTJV_DTL
3)FIN_MTJV_DTL1 ( when i add same table 2nd time so block wizard changed it name FIN_MTJV_DTL to FIN_MTJV_DTL1 ).
Re: Master Detail Relation [message #637872 is a reply to message #637862] Thu, 28 May 2015 02:39 Go to previous messageGo to next message
cookiemonster
Messages: 13920
Registered: September 2008
Location: Rainy Manchester
Senior Member
So you have 2 tables with 2 of the blocks based on the same table.
Re: Master Detail Relation [message #637879 is a reply to message #637872] Thu, 28 May 2015 04:39 Go to previous messageGo to next message
Littlefoot
Messages: 21807
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
FIN_MTJV_DTL1 is, then, a block name (not a table name). OK.
Re: Master Detail Relation [message #637881 is a reply to message #637879] Thu, 28 May 2015 04:50 Go to previous messageGo to next message
Nasir.azeem
Messages: 40
Registered: September 2014
Location: Karachi
Member
Problem Resolved Smile
Re: Master Detail Relation [message #637882 is a reply to message #637881] Thu, 28 May 2015 04:53 Go to previous messageGo to next message
Littlefoot
Messages: 21807
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
How?
Re: Master Detail Relation [message #637885 is a reply to message #637882] Thu, 28 May 2015 05:06 Go to previous messageGo to next message
Nasir.azeem
Messages: 40
Registered: September 2014
Location: Karachi
Member
Sir when i destroy relation to master block and again create relation. Actually at first i refer two column relation in master block. after problem destroy relation and again create relation but i refer only one column. so it have been perform well.

First Relation i was use

FIN_MTJV_DTL.MJVD_TRANS_ID = FIN_MTJV_HDR.MJVH_TRANS_ID AND
FIN_MTJV_DTL.MJVH_TRANS_ID = FIN_MTJV_HDR.MJVH_TRANS_ID

Second Time i use

FIN_MTJV_DTL.MJVD_TRANS_ID = FIN_MTJV_HDR.MJVH_TRANS_ID

Error found in relation.
Re: Master Detail Relation [message #637887 is a reply to message #637885] Thu, 28 May 2015 05:09 Go to previous message
Littlefoot
Messages: 21807
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
OK, thank you.
Previous Topic: Record has been updated by another user. Re-query to see change
Next Topic: what is format mask value for financial year for ex: 2015-16
Goto Forum:
  


Current Time: Thu Apr 18 22:59:51 CDT 2024