Hi Friends,
I need a clarification in the below code. Before that I just explain what I am doing. I have 5 dataitems and those dataitems are NOT indented. I am executing the dataitem one-by-one and writing the output into text file using FILE datatype. While doing so, the previous dataitem's output is overwritten by the later one. I have written the same code in all the dataitem's OnPostDataitem trigger.
Variables:
NFILE (Datatype: File)
WriteStream (Datatype: OutStream
OnPostDataitem():
NFile.CREATE('C:\Sample.txt');
NFile.CREATEOUTSTREAM(WriteStream);
WriteStream.WRITETEXT(Text1 + Text2 + Text3+...+Text n);
WriteStream.WRITETEXT;
NFile.CLOSE;
Can anyone point out me, where am I doing wrong?
Thanks and Regards,
Aravindh R.
Answers
after Second dataitem file wiill be created(Overwritten) again..exported data
after third dataite file will be created again(Overwritten) and exported data..
etc
etc
hope you understood..
-Mohana
http://mohana-dynamicsnav.blogspot.in/
https://www.facebook.com/MohanaDynamicsNav
http://mibuso.com/blogs/mohana/2011/09/11/how-to-create-a-text-file-and-writeappend-text-into-the-file/
-Mohana
http://mohana-dynamicsnav.blogspot.in/
https://www.facebook.com/MohanaDynamicsNav
Working in FILE datatype is quite interesting...!!
Thanks a lot Mohana.. !!
Welcome
-Mohana
http://mohana-dynamicsnav.blogspot.in/
https://www.facebook.com/MohanaDynamicsNav