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!

Schedule Export to PDF

Status
Not open for further replies.

diobbi

Technical User
Aug 19, 2002
6
Hi,

I've seen some posts on this and I've looked at quite a few of the 3rd party tools however, I can't find one that does exactly what I am looking for. We've integrated RAS9 with our asp application. Our application passes a paramater to the report and the user views the report on screen. They then select the export button and save the report as an rpt file in a directory on our server. What I need to do is have a 3rd party scheduler export any rpt files in this directory to a pdf automatically each eve. The problem with the schedulers I've looked at is you have to type the name in of the report to export. These reports will always have different names ie., It will be the ticker symbol of the company they are working on with an rpt extension. We then want to export to a pdf with the same name ie ticker symbol.pdf. Does anyone know of any scheduler which will automatically read all files in a directory and export them?
Thanks.

Deborah
 
I think that you'd have to write that functionality.

Have you considered just saving the reports to a PDF instead of an .rpt, or having your ASP also save the files in PDF format in another directory?

-k
 
First, make sure you review the 3rd party tools listed at:

My CUT UFL allows you to trigger exporting to both the RPT as well as the PDF if the user simply selects TRUE as the value for a parameter {?Export_to_RPT_and_PDF) before previewing or when Refreshing the main report.

I think any of the developers behind the existing report scheduling solutions could develop (or adapt their existing software) to do what you have in mind very easily. Just contact them.

If you are comfortable with VB & Crystal programming you could develop an application that does what you have in mind without too much difficulty (since the exported RPT files already contain the data).

Cheers,
- Ido CUT, Visual CUT, and DataLink Viewer:
view, e-mail, export, burst, distribute, and schedule Crystal Reports.
 
What I would do is to create an ASP page that reads the ticker info from a small database and then runs an export loop creating the files you require.

Then using good old windows scheduler you can schedule the system to run this web page on a daily basis.

Else create a application using C# or VB and put a timer on that to run every 24 hours

Thanks,
Gavin
 
1. Why don't you just use Acrobat. It has a built in distiller process for doing just this. Create a batch process and a folder. Ensure that the files will all go to that folder and it will convert them.
2. I use a program called Octopdf along with Intelliscribe. It involved a lot of programming but it is functional. Depending on your circumstances and the number of files it works.
3. Check out They have a product previously called Pulse now I think it is something like deliveryware. It will convert anything to PDF. It recognizes the document and can even depending on what you select rename it to whatever you want it based on a line/area capture in the document. Its pricey but it is nice.
 
Hi everyone,

Thanks for all your responses. To address some of the points. First, - the reason we export the report to an rpt file and not just straight to a pdf file is because we use the html viewer to view the report. With the html viewer we loose a lot of the Crystal formating and when we go directly from the html viewer to a pdf the formatting is the lost in the pdf. When we export to an rpt file from the html viewer all the formatting is there. We've tried using the Active X viewer but we can't get it to work with passing parameters.

After reading all the responses I think my best bet would be to program this in VBScript/ASP. I found some sample code for exporting on this site but it's for RDC not RAS.
Can anyone point me in the right direction on some sample ASP code that exports an rpt to a pdf using RAS?
 
Well forgive my acronym ignorance(RAS?) but here is some basic code I use to export to pdf.

//rName = Report Name
//rDesc = report Description
//eType = either .pdf or .xls or .doc
//rReport = The report Document
private void ExportReport(string rName,string rDesc,string eType,ReportDocument rReport)
{
ExportOptions CrExpOpt;
DiskFileDestinationOptions diskOpts = new DiskFileDestinationOptions();
string Fname = "C:\\" + rDesc;
diskOpts.DiskFileName = Fname;
CrExpOpt = rReport.ExportOptions;
CrExpOpt.DestinationOptions = diskOpts;
CrExpOpt.ExportDestinationType = ExportDestinationType.DiskFile;
if( eType == "xls" )
CrExpOpt.ExportFormatType = ExportFormatType.Excel;
if( eType == "pdf" )
CrExpOpt.ExportFormatType = ExportFormatType.PortableDocFormat;
if( eType == "doc" )
CrExpOpt.ExportFormatType = ExportFormatType.WordForWindows;

rReport.Export();
rReport.Close();

I thin that is everything, if I missed something it would be because I have had to patch it together from a few of my functions.

Thanks,
Gavin
 
There is a utility that CrystalDesk has that does exactly what you are looking for. You just specify a source folder that contains all of the .rpt files and destination folder where you would like the pdf files exported to. You can also specify the frequency that you would like the source folder sampled for new .rpt files.

Contact sales@crystaldesk.com for more information and price.

Gary Rogers CrystalDesk (Report Scheduler)
Crystal Reports consulting, and software interface development.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top