Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Report and text file
Message
General information
Forum:
Visual FoxPro
Category:
Reports & Report designer
Miscellaneous
Thread ID:
00055641
Message ID:
00055797
Views:
28
>>>>Hi,
>>>>
>>>>I would like to know how I could run a report so that the results are
>>>>printed directly to a .txt file. I tried with
>>>>Query>>destinatin>>report>>file, but the report passes anyway troughout the printer manager resulting in a file that is impossible to read.
>>>>I wonder if it is a FoxProw problem or a Windows 95 problem. Anyone
>>>>has a solution?
>>>>
>>>>Philippe
>>>
>>>you can use the ascii clause. i've had problems with it ( labels overlapping etc ) but it will probably help you out.
>>
>>I played around with the ASCII clause, using a wide report which prints landscape. It kept truncating characters, no matter what value I used for ASCICOLS(). It may work for you if your reports are simple, but don't expect too much. When I return to the problem of printing reports to files, I will probably abandon the report writer and start automating Word or Excel.
>
>yeah i had a few reports that other programs used and expected the format to be exact. report form to file was fine in fox2.5 for dos
>but the vfp5 to ascii was so unpredictable we had to scrap it for these reports. i ended up writing code to manually scan the table and low level write the report keeping track of rows so that i could insert headers and footers in the correct spot. this worked pretty good but when we got into reports with mulitiple groups things got pretty hairy. if it's just an ascii report with no rich formatting you're probably better off using fcreate,fputs, etc than automating word. i've found automating word to be very useful, but very slow.

Try using printer fonts like Courier or Draft, because they take exact width as ascii text. I have been doing this and works for me, also use the Picture formating in the fields. If the numbers in fields are too big for the width of the textbox, you will see '****' in the preview which means that box length is small. If the report previews correctly, it will print correctly.

Good luck,

Abdul Ahad
Abdul Ahad Khan
CSi
www.csi-pk.com
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform