How to create a report to export into text file and also i had three companies i want to run the report in one company then i need to get each company information in to in each text file. when i run from another company then i need to get error message.
Thanks in advance.
0
Answers
File1.CREATE(filePath);
File1.CREATEOUTSTREAM(gOutStreamOst);
gOutStreamOst.WRITETEXT(Customer."No."+';'+Customer.Name+';'+Customer.Address+';'+Customer."Phone No."+';'+Customer."E-Mail");
gOutStreamOst.WRITETEXT();
gOutStreamOst.WRITETEXT(Vendor."No."+';'+Vendor.Name+';'+Vendor.Address+';'+Vendor."Phone No."+';'+Vendor."E-Mail");
File1.CLOSE;
Why don't you use a dataport?
All companies are in the table "Company" (ID 2000000006).
You can change the company of an individual table using the function "Rec.CHANGECOMPANY"
as per my requirements i need to do it by using report.
i had written the code on OnPostReport, but i am getting only one record in the customer table and also when i run in one company the other company customer information should create a new text file individually.
Yeah i tried this solution also but no result i am getting only one record if the customer i.e,. last record. i apply looping as
gCountInt := 0;
IF Customer.FIND('-') THEN
REPEAT
gCountInt := gCountInt + 1;
UNTIL Customer.NEXT <= 0;
but no result.
i think something i am missing the code,,