Results 1 to 3 of 3

Thread: Help.....About print to file.

  1. #1

    Thread Starter
    Fanatic Member Wen Lie's Avatar
    Join Date
    Jul 1999
    Location
    Singapore
    Posts
    524

    Post

    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

  2. #2
    New Member
    Join Date
    Aug 1999
    Posts
    15

    Post

    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

  3. #3
    Addicted Member
    Join Date
    Sep 1999
    Posts
    229

    Post

    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).]

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width