Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Crystal Report :Print to File to create a prn or a postscript file 1

Status
Not open for further replies.

anuc2000

Programmer
Nov 10, 2000
26
US
I have a Visual Basic Application that opens a Crystal Report
I have to generate a Postscript file from this crystal Report.
If I do it manually through a printer set to Adobe Distiller and then Print to file I generate a PostScript File but I am unable to do so Programatically
Any Help is greatly appreciated

TIA
 
I was wondering if you ever found a solution to your problem with exporting to a .prn file through code. I am now wrestling with the same problem.

If you found a solution, I'd appreciate it if you could post it or e-mail it to me because it would really help me out with a project I'm currently working on. Thanks.

Michael P. Gerety
 
I did figure out a solution
while it may not be the best of solutions it works as of now so here goes...
I have the Adobe Distiller installed on my machine
I configured a new (bogus) printer to the same Driver (I have ADOBEPS4) to have an unknown local port. the Port essentially is the Path where you want to put your Output Postscript files.for example it could be C:\MyDoc\Test1.ps -- you have to specify the Filename.The final product would look like this C:\MyDoc\Test1.p (unknown local port). now if you put a crystalreport ocx controll on your form and hardcode the printer settings it will print to the path specified above.
then you use some vb code to change the name of the file as you want it.
I find this works and I am excited that it is because i have spent a lot of time on this
Hope you will find it of use too


 
The Filecopy/Rename command after a print command is not allowed
but you can achieve this by using Crystal Reports Print Engine APIs
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top