Home » Developer & Programmer » Forms » Show multiple records
Show multiple records [message #133237] Thu, 18 August 2005 03:27 Go to next message
samit_gandhi
Messages: 226
Registered: July 2005
Location: Hong Kong
Senior Member

Dear

I have a master detail form in which i have one query who returns more than one record. The query is fire in master block and when the query fire what ever the records are there in the query must be shown in the detail block. The detail block having the property more than one record true.

Please advice.

Samit Gandhi
Re: Show multiple records [message #133246 is a reply to message #133237] Thu, 18 August 2005 03:44 Go to previous messageGo to next message
saadatahmad
Messages: 452
Registered: March 2005
Location: Germany/Paderborn
Senior Member

Hi,
This is the default functionality by forms. What is the problem you are facing? Your question is not clear. Please read the post by Maher on top of the forum for how should we post the question in this forum.

Regards.

Saadat Ahmad
Techworld Information Systems, Kuwait.

[Updated on: Thu, 18 August 2005 03:44]

Report message to a moderator

Re: Show multiple records [message #133249 is a reply to message #133246] Thu, 18 August 2005 03:53 Go to previous messageGo to next message
samit_gandhi
Messages: 226
Registered: July 2005
Location: Hong Kong
Senior Member

Dear

I am making an inventory system. I have created a master detail form for issue. I have also created one master detail form for return. I need all the record of the detail block of issue form in the detail block of return form. There is no relationship has been created between issue tables and return tables. Internally the issue tables & return tables has their primary-foreign key relationship.

Now hope u understand my problem

Samit Gandhi
Re: Show multiple records [message #133252 is a reply to message #133249] Thu, 18 August 2005 04:13 Go to previous messageGo to next message
saadatahmad
Messages: 452
Registered: March 2005
Location: Germany/Paderborn
Senior Member

ok...even there is no relationship but I hope that there will be a relationship in the column of your master and detail form.
So you can create a realtion manually between your two blocks.
After creating your master and detail form, double click on the relation from master block and give there the detail block name and the join condition. Keep the remaining settings as default. Click on Ok button and this will create the relation between your master and detail form.
I'm pasting the screenshot of the relation dialogue box.

Hope this is what you want.

Regards./forum/fa/361/0/
  • Attachment: relation.GIF
    (Size: 34.41KB, Downloaded 1120 times)
Re: Show multiple records [message #133254 is a reply to message #133252] Thu, 18 August 2005 04:24 Go to previous messageGo to next message
samit_gandhi
Messages: 226
Registered: July 2005
Location: Hong Kong
Senior Member

Yes i can create it manually but i need the data of the detail block of issue form into the detail block of return form.

How to do it?

In detail
Two forms
Issue(master-detail)
Return(master-detail)

There are four table
1) Issue_master
Primary key issue_no

2) Issue_detail
Foreign key Issue_no references issue_master

3) Return_master
Primary key issue_no

4) Return_detail
Foreign key issue_no references return_detail.

Now i need the data of the issue_detail table into return_detail block.

Now u clearly understand the problem

Pls reply immediately

Samit Gandhi
Re: Show multiple records [message #133259 is a reply to message #133254] Thu, 18 August 2005 04:58 Go to previous messageGo to next message
saadatahmad
Messages: 452
Registered: March 2005
Location: Germany/Paderborn
Senior Member

ok...so for this purpose, you need to change the base table of a block dynamically.
You can do it in these ways:
One is to Basing a block on a Stored Procedure, From Clause Query or a Transactional Trigger and the second is to use properties with different built-ins.
You can also create another block which you want to query at runtime and change the datablock dynamically at run-time.
The first method will be lengthy so I sugest you to use the second method.
For this purpose, you can use SET_BLOCK_PROPERTY with the combination of QUERY_DATA_SOURCE_NAME and DML_DATA_TARGET_NAME.
This way you can change your base block dynamically at run-time and query other table's records at run-time.

I hope, you can do the remaining work yourself.

Regards.

Saadat Ahmad.
Re: Show multiple records [message #133265 is a reply to message #133259] Thu, 18 August 2005 05:23 Go to previous messageGo to next message
samit_gandhi
Messages: 226
Registered: July 2005
Location: Hong Kong
Senior Member

Dear Sir,

I am new in this field. Your terminology is looking hi-fi for me. Can u explain me in detail pls.

Samit Gandhi
Re: Show multiple records [message #133306 is a reply to message #133265] Thu, 18 August 2005 07:59 Go to previous messageGo to next message
saadatahmad
Messages: 452
Registered: March 2005
Location: Germany/Paderborn
Senior Member

ok....if you'r new then do this.
Create another data block issue in your return form. create a new content canvas and place this data block on this new canvas.
make this a multi-record data block. Just like your original block in the form.
Create a relationship between your master block and this detail block manually.
Create a button on your original canvas andwrite the code as follows
When-Button-Pressed
GO_BLOCK('your second block');
EXECUTE_QUERY;

Open the property pallete of this newly created blocj and give a WHERE clause. Give issue_no in this WHERE clause.

You can query the records in other table this way..

I think it should be clear to you now.

Refards.
Re: Show multiple records [message #133310 is a reply to message #133306] Thu, 18 August 2005 08:11 Go to previous messageGo to next message
samit_gandhi
Messages: 226
Registered: July 2005
Location: Hong Kong
Senior Member

This will not solve my problem. I just want to display the records of detail table of issue to the detail block of return not on another form.

samit gandhi
Re: Show multiple records [message #133311 is a reply to message #133310] Thu, 18 August 2005 08:24 Go to previous messageGo to next message
saadatahmad
Messages: 452
Registered: March 2005
Location: Germany/Paderborn
Senior Member

you minundestood my answer. I'm not asking you to create a new form. Create the new block and a new canvas in the same form where you want to display the records. I know you already have a detail block on that form.
now when you want to view the records from other table just show that block at run time and you can view the records. This way, your previous block will be hidden and new block will come to view the result.
I'm sorry I don't have access to Oracle or forms otherwise I would show you how easy it is and how to do.

Regards
Re: Show multiple records [message #133596 is a reply to message #133311] Fri, 19 August 2005 20:25 Go to previous message
samit_gandhi
Messages: 226
Registered: July 2005
Location: Hong Kong
Senior Member

Dear

I need not only to see, I also have to enter the other filds like return quantity against it.

So do it on urgent basis.

Samit Gandhi
Previous Topic: Help me !
Next Topic: Migrating Form6i to Forms9i
Goto Forum:
  


Current Time: Thu Sep 19 22:42:30 CDT 2024