REETA1967
28th January 2003, 17:07
hi,

select dmoes200.clno,dmoes200.slno
from dmoes200
where dmoes200.orno = {:orno.t}
selectdo
:dmoes200.clno = dmoes200.clno
:dmoes200.slno = dmoes200.slno
endselect

this query is displaying at one row only . i have
taken multiple occurance .i want to display multiple lines
in a form

i have taken form type 4

bye

jaapzwaan
28th January 2003, 17:15
Hi,

Can you please rewrite your question? What is it that you're trying to achieve.
If you want to create a multi-occ form, you have to create a type 2 or 3 session. Type 4 is for printing/processing.
For data retrieval and displaying, you don't have to write a query. This is done automatically for you by the 4GL Engine.

If it is a printing session that you want, you should rewrite your query into something like:


select *
from dmoes200
where dmoes200.orno = {rno.t}
selectdo
rprt.send() or brp.ready()
endselect


Regards,
Jaap Zwaan

Ankita
19th March 2008, 08:37
Hello Jaap!

Can u plz tell me, if the above script is to be written for the display session and not for the report, then how is it possible?

Thanks.

suhas-mahajan
19th March 2008, 12:33
Hi Ankita and Reeta,

You need to create a multi occurance display session using main table dmoes200.

Hope this helps.

regards,

-Suhas

mark_h
19th March 2008, 14:31
Hello Jaap!

Can u plz tell me, if the above script is to be written for the display session and not for the report, then how is it possible?

Thanks.
Ankita the above code was for a print session, not a display session.

Ankita
20th March 2008, 10:30
Yes, thats true Mark. But I too have somewhat similar problem as Reeta had. I have to display multiple records from a transaction table on a multi-occurance form of type 3 of the Display Session that has master table as the main table. So, for one record of the main table i have to display multiple rows from the transaction table. And through scripting how is it possible?

bigjack
20th March 2008, 12:18
Hi Ankita,

As far as i understand your requirement , you can create a multi-occurrence session on the transaction table. You can fetch and display the master table data on this multi-occurrence session.

Else there are different(but slightly complex) ways of achieving your requirement

Let us know if this helps you.
Bye

Ankita
21st March 2008, 14:09
But creating session on the transaction table wont fulfill the requirement of displaying all the bills for the items, supplier no. wise. And supplier no. is in the master table. Thats why, i had to create session on the Master table. Items is the Master table and Bills is the Tansaction table. So, can this be done in other way?

mark_h
21st March 2008, 14:32
The only solution that I see is using synchronized sessions - see my posts to baan1612 and a link to the thread. It is not easy, but it is possible.

baan1612
22nd March 2008, 16:20
Hi Ankita,I was discussing a similar scenario with Mark and got a work around that suits my requirement..I did'nt use a sync session,I am attaching my code here for your reference,infact a lot depends here on ur table structure(both tables)...in my case I have the header table(tskci009) with composite key as installation(cins) and char. code(ccod) while the lines table(tskci008) has inst. type(ctyp) and char. code(ccod)... here im inserting cins and getting the ctyp and details from the other table...hope it helps

Ankita
22nd March 2008, 19:00
Thanks for sharing alternative solution. But I have a doubt. As far as i understand for cins field, there will be only one record from the 009 table. Am i correct? Since, in my case, i want more than one records from the transaction table. Please, can you make this point more clear?

baan1612
23rd March 2008, 08:32
No infact there is no cins field in the lines table..I get the line details by getting the ctyp corresponding to the cins field in the header table(009)..so there are multiple records corresponding to ctyp and hence for cins.

Ankita
24th March 2008, 08:22
Ok. Got your point. Is your session created on Master table? And second point is, how are u displaying multiple records for one record from master table. In before.display for field.tskci009.ccod, are you selecting records based on the values of actual.occ and old.occ for the same purpose.

baan1612
24th March 2008, 15:58
Yes my session is based on the main table tskci009 and I cannot get all records simultaneously just after the display of cins field,in fact I need to tab to every occurence to fetch the corresponding record..I have made some changes to the code I posted earlier due to some problems..its not ready yet so i'll post it when I am confident about it...btw do u have the same same requirement?

Ankita
25th March 2008, 08:20
Yes, my requirement is also same as yours. I too have to display all the records from the transaction table at once according to the value of master table field value. My session is also created on the master table. And i am not able to display all the records from the transaction table except the last one.