Writing Code
 Crystal Reports Forum : Crystal Reports for Visual Studio 2005 and Newer : Writing Code
Message Icon Topic: Programatically Export Report to Pdf Post Reply Post New Topic
Author Message
JohnS.
Newbie
Newbie
Avatar

Joined: 08 Mar 2007
Location: United States
Online Status: Offline
Posts: 18
Quote JohnS. Replybullet Topic: Programatically Export Report to Pdf
    Posted: 05 Jun 2007 at 1:26pm
Hey all,
 
I have a windows app that has an accounting section, where we track costs of projects. When we want to bill a customer we create a new invoice of of the main project totals. Since the main project totals get updated every time we need to create an invoice, i need to keep track of previous totals. There by creating a report of this previous totals section, when we create a new invoice i need to export the report in the back ground to a file that we can refer to when we want. My question is how can i asign a file name to the report in the background with out the user getting in volved and then export it automaticaly to a pdf. in the same folder as the rest of the previous reports.
 
 
John S.
 
IP IP Logged
hilfy
Admin Group
Admin Group
Avatar

Joined: 20 Nov 2006
Online Status: Offline
Posts: 3702
Quote hilfy Replybullet Posted: 06 Jun 2007 at 8:53pm
If you're trying to export the report programmatically, you don't need the viewer.  You just need to load the report into a ReportDocument object and then export if from there.  Assuming that this is a .NET app, you can find sample code for exporting in the Crystal Reports .NET SDK section of the Developer Library (go to http://diamond.businessobjects.com/developer/library and select the version that you're using (XI, XI r2 or XI r2 sp2).  If you download the Sample Code, you'll find both ASP.NET and WinForms samples in the zip file.
 
(I spent some time today working on a similar issue, that's how I know the code is there in the samples!)
-Dell
IP IP Logged
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.031 seconds.