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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

CR and VFP and Adobe

Status
Not open for further replies.

bettyfurr

Technical User
Mar 12, 2002
371
US
I am running crystal reports out of VFP 7.0 interface. It works. The user now what to write to Adobe. This works. They want the default name to be the name of the report not the filename. I would change the filename except there is a naming convention.

Are there any way through VFP to do this?

Betty

(-:
 
I don't believe anything extra is necessary. We're doing the same thing at our location. I think that the installed CR9 software (developer and/or runtime) come with the ability to save as a PDF file as well as many other formats.
 
It writes to adobe but uses as the default name the name of the file. I wanted to pass through VFP another name.

I could seem to do this through an object, just rename the file.

Thank you,

 
I've messed with the CR Objects quite a bit (though I wouldn't call myself a genious by any means) and I've never run across one that would allow that.
 
Oh, I have tried many things. I am faced with the same issue, a VFP database and Crystal exporting to a PDF. I have never been able to find a way to rename the file. I am not a programmer, so I am not versed with the finer points of VFP. But if you do find out how, I would lOVE it if you would share?

Bob
mail@peveyweb.com
 
The one that comes to mind would be !REN, which would use a DOS session to rename the file:

!ren abc123.pdf MyPdf.pdf

-k
 
If you're running Crystal 8.5, you'll find just about everything you need here:

Also, if you're using the RDC, you should be able to get the report title from the Report object, then use that as the export file name (just make sure that you've set the report's Title in the CR Designer). I don't know beans about VFP, but in VB, it would be:
[tt]
Dim oCR As New CRAXDRT.Application
Dim oRpt As CRAXDRT.Report
Dim oExp As CRAXDRT.ExportOptions
Dim sRptTitle As String

Set oRpt = oCR.OpenReport("C:\MyReport.rpt")
sRptTitle = oRpt.ReportTitle

Set oExp = oRpt.ExportOptions
oExp.DestinationType = crEDTDiskFile
oExp.FormatType = crEFTPortableDocFormat
oExp.DiskFileName = "C:\" & strReportTitle & ".pdf"
oRpt.Export False
[/tt]
Hope that gets you a little further...

-dave
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top