For Programmers: Free Programming Magazines  


Home > Archive > Clarion > July 2004 > Printing to ASCII









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Printing to ASCII
Vickie

2004-07-02, 3:55 pm

Hi,

I want to be able to route a print file to an ASCII image. Tab column breaks
would be awesome. I tried using PrinterDialog, but the "to file" option
creates a .prn file, which is unreadable in Word or other editor. Any help
would be greatly appreciated. :)

I am using CW 4.0 <blush>.

Thanks,

Vickie
Seahorse@redshift.com


Jack van Munster

2004-07-03, 8:55 am

I always do it in a source code, it's primitive but effective
In data section create a file

Data section
Your_txt_file
FILE,DRIVER('ASCII'),PRE(Prt),CREATE,BIN
DABLE,THREAD,NAME('Your_txt_file')
Record RECORD
Regel STRING(255)
END


Processed code
CLOSE(Your_txt_file)
REMOVE(Your_txt_file)
CREATE(Your_txt_file)
OPEN(Your_txt_file,42h)

SET(YourTPS_key,YourTPS_key)
OPEN(ProgressWindow)
ACCEPT
LOOP
NEXT(YourTPS)
IF ERRORCODE() THEN break.
CLEAR(Prt:REGEL)
Prt:REGEL = Your datafield
ADD(Your_txt_file)
END
ect......


Andre Engelbrecht

2004-07-03, 8:55 am

and regarding the Columns, you could

Prt:REGEL = Format(Your datafield1,@s22)&''&Format(Your datafield2,@s16)&'
etc

ADD(Your_txt_file)

Regards

Andre

"Jack van Munster" <jack.van.munster@home.nl> wrote in message
news:cc5nae$588$1@news3.tilbu1.nb.home.nl...
> I always do it in a source code, it's primitive but effective
> In data section create a file
>
> Data section
> Your_txt_file
> FILE,DRIVER('ASCII'),PRE(Prt),CREATE,BIN
DABLE,THREAD,NAME('Your_txt_file')
> Record RECORD
> Regel STRING(255)
> END
>
>
> Processed code
> CLOSE(Your_txt_file)
> REMOVE(Your_txt_file)
> CREATE(Your_txt_file)
> OPEN(Your_txt_file,42h)
>
> SET(YourTPS_key,YourTPS_key)
> OPEN(ProgressWindow)
> ACCEPT
> LOOP
> NEXT(YourTPS)
> IF ERRORCODE() THEN break.
> CLEAR(Prt:REGEL)
> Prt:REGEL = Your datafield
> ADD(Your_txt_file)
> END
> ect......
>
>



David S. Beggs

2004-07-04, 8:55 pm

Vickie,
the tintools report previewer and CPCS have this ability, as does the
"generic printer" built into windows.
HTH
Dave Beggs

"Vickie" <Seahorse@Redshift.com> wrote in message
news:10eaqn7mhvh4f73@corp.supernews.com...
> Hi,
>
> I want to be able to route a print file to an ASCII image. Tab column

breaks
> would be awesome. I tried using PrinterDialog, but the "to file" option
> creates a .prn file, which is unreadable in Word or other editor. Any help
> would be greatly appreciated. :)
>
> I am using CW 4.0 <blush>.
>
> Thanks,
>
> Vickie
> Seahorse@redshift.com
>
>



Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com