Rajat Sharma
Member
Hello Everyone,
I took a single select browse widget associated with customer table having 3 fields which populates automatically when we execute that.
Requirement:- i wanted to send multiple records which i select from a browse one-by-one to a .text file and i can select n number of records from browse but one-by-one because its a single select browse.
These are the following steps that i have followed:-
1. When i use OUTPUT TO statement in VALUE-CHANGED trigger of browse-widget then in .text file it shows the data which i select latest from the browse(only one record is there) this could be because of frame flashing.
--------------------------------------------------------------------------------------------------------------
2. In case i use stream and define that stream in definition section and on VALUE-CHANGED trigger Ex:-
IF AVAILABLE customer THEN DO:
PUT STREAM c-strm
customer.name
customer.custnum
customer.balance
END.
Message i am getting while selecting a record from Browse-Widget:-
ERROR:-
attempt to write to a close stream.
--------------------------------------------------------------------------------------------------------------
3. In third step i define the stream in definition section but i associated the stream in VALUE-CHANGE trigger Ex code in VALUE-CHANGED trigger:-
OUTPUT STREAM c-strm to VALUE("c:\abc\111.txt").
IF AVAILABLE customer THEN DO:
PUT STREAM c-strm
customer.name
customer.custnum
customer.balance
END.
Message i am getting while selecting a record from Browse-Widget:-
ERROR:- c:\abc\111.txt is already in use.
------------------------------------------------------------------------------------------------------------
i am unable to understand why i getting these errors with streams. Please provide your inputs that how could i implement this.
THANKS!!!!
I took a single select browse widget associated with customer table having 3 fields which populates automatically when we execute that.
Requirement:- i wanted to send multiple records which i select from a browse one-by-one to a .text file and i can select n number of records from browse but one-by-one because its a single select browse.
These are the following steps that i have followed:-
1. When i use OUTPUT TO statement in VALUE-CHANGED trigger of browse-widget then in .text file it shows the data which i select latest from the browse(only one record is there) this could be because of frame flashing.
--------------------------------------------------------------------------------------------------------------
2. In case i use stream and define that stream in definition section and on VALUE-CHANGED trigger Ex:-
IF AVAILABLE customer THEN DO:
PUT STREAM c-strm
customer.name
customer.custnum
customer.balance
END.
Message i am getting while selecting a record from Browse-Widget:-
ERROR:-
attempt to write to a close stream.
--------------------------------------------------------------------------------------------------------------
3. In third step i define the stream in definition section but i associated the stream in VALUE-CHANGE trigger Ex code in VALUE-CHANGED trigger:-
OUTPUT STREAM c-strm to VALUE("c:\abc\111.txt").
IF AVAILABLE customer THEN DO:
PUT STREAM c-strm
customer.name
customer.custnum
customer.balance
END.
Message i am getting while selecting a record from Browse-Widget:-
ERROR:- c:\abc\111.txt is already in use.
------------------------------------------------------------------------------------------------------------
i am unable to understand why i getting these errors with streams. Please provide your inputs that how could i implement this.
THANKS!!!!
Last edited: