-
Dear All,
Hi all... How r ya ??? Well, I wanna make a print to file facility at my application. The data will be taken from my database at SQL Server, and the report will be printed to file, not a print-out report. And the file is .txt
Could anyone tell me how can I do that ??? Thx, and I do really appreciate to anykinds of help.
BRgds,
Wen Lie
-
Assuming you have your records stored in array named Record() :
Code:
dim cnt as integer
open "c:\thefile.txt" for output as #1
for cnt = 1 to TotalRecordCount
print #1, Record(cnt) 'or however you have your data stored
next cnt
close #1
-
Hi Wen Lie,
If you're not using Crystal Report (CR), maybe you can do
what TheMadMonk told you. But if you're, you can
just export your data out from CR to text file (no need to worry on the formating) by clicking export menu (button)
or you can control it from your VB program thru CR component.
CR has many formatting-options, you can check it out.
Regards
Keiko
[This message has been edited by Keiko (edited 02-22-2000).]