Writing Code
 Crystal Reports Forum : Crystal Reports for Visual Studio 2005 and Newer : Writing Code
Message Icon Topic: How to Print to File in CR for .NET (VB.NET 2005) Post Reply Post New Topic
Page  of 2 Next >>
Author Message
N11689
Newbie
Newbie


Joined: 13 Jun 2007
Location: United States
Online Status: Offline
Posts: 22
Quote N11689 Replybullet Topic: How to Print to File in CR for .NET (VB.NET 2005)
    Posted: 13 Jun 2007 at 8:32am
We are upgrading our VB6 application to VB.NET(2005).  We are switching from the RDC to using Crystal Reports for .NET assemblies.
 
In VB6 (RDC) we used to be able to use the PrintOutEx Method to print a report to a file.  I cannot locate how to do this in VB.NET(2005) using the Crystal Reports for .NET assemblies.
 
What we are trying to accomplish is sending the report to a printer that has a PostScript print driver, and the end result is to print to a file.  So, the report will end up as a file in PostScript format that we will then fax via our faxserver.
 
The ExportToDisk method does not work for us as it required you to export to a specific format, none of which are postscript.  So, we really need to know how to print to a file.
 
Please help.  Thank you.
IP IP Logged
BrianBischof
Admin Group
Admin Group
Avatar

Joined: 09 Nov 2006
Online Status: Offline
Posts: 2458
Quote BrianBischof Replybullet Posted: 13 Jun 2007 at 8:40am
I don't have it off the top of my head. But something like PrintToPrinter() is what you're looking for I think.
Please support the forum! Tell others by linking to it on your blog or website:<a href="http://www.crystalreportsbook.com/forum/">Crystal Reports Forum</a>
IP IP Logged
N11689
Newbie
Newbie


Joined: 13 Jun 2007
Location: United States
Online Status: Offline
Posts: 22
Quote N11689 Replybullet Posted: 13 Jun 2007 at 10:50am
PrintToPrinter only allows the arguments (Copies, Collated, StartPage, EndPage).  The PrintOutEx method had the arguments of (PromptUser, Copies, Collated, StartPage, StopPage, PrintFileName).
 
Any other suggestions
IP IP Logged
BrianBischof
Admin Group
Admin Group
Avatar

Joined: 09 Nov 2006
Online Status: Offline
Posts: 2458
Quote BrianBischof Replybullet Posted: 13 Jun 2007 at 11:01am
Ahh. Yes. The RDC has much more functionality built into it. I don't know of another option then. Sorry.
Please support the forum! Tell others by linking to it on your blog or website:<a href="http://www.crystalreportsbook.com/forum/">Crystal Reports Forum</a>
IP IP Logged
hilfy
Admin Group
Admin Group
Avatar

Joined: 20 Nov 2006
Online Status: Offline
Posts: 3702
Quote hilfy Replybullet Posted: 13 Jun 2007 at 3:31pm
Is there a problem with just installing the printer driver for the postscript printer and then printing directly to it?  That should handle the formatting you need without having to send the report to a file first.
 
-Dell
IP IP Logged
N11689
Newbie
Newbie


Joined: 13 Jun 2007
Location: United States
Online Status: Offline
Posts: 22
Quote N11689 Replybullet Posted: 14 Jun 2007 at 4:56am

We distribute our application to many customers.  Our application provides the ability to fax certain reports.  The fax software our customers use require the file to be faxed be in a postscript format.  Therefore, we print the Crystal Report to a file using the postscript print driver.  The fax software will then search its directory for any postscript files and fax them.  Therefore, we cannot print directly to the postscript printer, we must print to a file.

Thanks.
IP IP Logged
hilfy
Admin Group
Admin Group
Avatar

Joined: 20 Nov 2006
Online Status: Offline
Posts: 3702
Quote hilfy Replybullet Posted: 14 Jun 2007 at 7:17am
Ok, now I understand.  Thanks for the info!
 
A quick search of the knowledgebase doesn't show anything more recent than 2001, so that's not a help.  You may have to open a support case with Business Objects to see if this is even possible with the new SDK.
 
-Dell
IP IP Logged
N11689
Newbie
Newbie


Joined: 13 Jun 2007
Location: United States
Online Status: Offline
Posts: 22
Quote N11689 Replybullet Posted: 02 Aug 2007 at 12:55pm
I opened an incident with Business Objects.  They said there is not a way to do what we want to do with the Crystal Reports for .NET assemblies.  They are going to implement a way to create a postscript file and include it in Service Pack 3 of Crystal XI Release 2.  They would not say how the postscript will be created (ie, ExportToDisk or any other method), only that they would include it in CRXI Release 2 SP3 which they intend to release sometime this coming winter.
IP IP Logged
Hridya
Newbie
Newbie


Joined: 12 Nov 2007
Location: India
Online Status: Offline
Posts: 2
Quote Hridya Replybullet Posted: 12 Nov 2007 at 12:59am

I also have similar problem..... Please let me know if you found any solution to this.....

 
 
Thanks in advance
 
IP IP Logged
N11689
Newbie
Newbie


Joined: 13 Jun 2007
Location: United States
Online Status: Offline
Posts: 22
Quote N11689 Replybullet Posted: 25 Apr 2008 at 6:02am
Just an update...this has been fixed in Crystal XI Release 2 Service Pack 3.
I just finished testing, and it now allows you to print to a file without prompting the user.  We are now able to create a postscript file.
 
 
IP IP Logged
Page  of 2 Next >>
Post Reply Post New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum



This page was generated in 0.030 seconds.