Problem using Crystal Report 8.5 to export PDF in Visual Basic 6.0 
Author Message
 Problem using Crystal Report 8.5 to export PDF in Visual Basic 6.0

I'm trying to export a Crystal Report 8.5 to Adobe Acrobat, to create
a PDF file in Visual Basic 6. I met the following problems:

Problem One - Using Crystl32.OCX, the control does not have export pdf
format to select.

Report.ReportFileName ="c:\mytest.rpt"
Report.PrintFileName = "c:\pdf_report.pdf"
Report.Destination = crptToFile
Report.PrintFileType =  <----- Cannot select PDF Format

Therefore, I'm using the following function to export PDF format.
Dim appl As New CRAXDRT.Application
Dim rep As CRAXDRT.Report
Set rep = appl.OpenReport("c:\mytest.rpt", 1)
rep.ExportOptions.DiskFileName = "c:\pdf_report.pdf"
rep.ExportOptions.DestinationType = crEDTDiskFile
rep.ExportOptions.FormatType = crEFTPortableDocFormat
rep.Export False

Can I use OCX Control to export PDF in Visual Basic?

Problem Two - After I used CRAXDRT object to export PDF, I found out
the problem. That is:

In mytest.rpt, it is using UniversCondensed Fonts. So, I exported it
to a PDF file in my PC (but my PC don't have this fonts).
It exported to a PDF successfully. When I opened it, the error message
appears "Unable to find or create the font 'UniversCondensed'. Some
characters may not display or print correctly."
If I installed this fonts, it displays very well. But in some reasons,
I do not want to install this fonts and I can see it well.

If I'm used a PDF Writer to print this report to a PDF, the PDF do not
use UniversCondensed Fonts if my PC do not have this fonts. It used a
Arial Fonts instead of this fonts. So, I can see it very well. In some
reasons, I cannot use PDF writer to print report to PDF, I MUST use
CRAXDRT object to export PDF.

Therefore, I have a question, how can I export to a PDF that the PDF
file can use a Arial Fonts instead of UniverseCondensed Fonts?
Can I specify the fonts to export a PDF?

Thanks a lot!



Fri, 02 Jul 2004 15:25:24 GMT  
 Problem using Crystal Report 8.5 to export PDF in Visual Basic 6.0
I can answer question #1. Exportoptions is the correct way to create the PDF
in crystal.


Quote:
> I'm trying to export a Crystal Report 8.5 to Adobe Acrobat, to create
> a PDF file in Visual Basic 6. I met the following problems:

> Problem One - Using Crystl32.OCX, the control does not have export pdf
> format to select.

> Report.ReportFileName ="c:\mytest.rpt"
> Report.PrintFileName = "c:\pdf_report.pdf"
> Report.Destination = crptToFile
> Report.PrintFileType =  <----- Cannot select PDF Format

> Therefore, I'm using the following function to export PDF format.
> Dim appl As New CRAXDRT.Application
> Dim rep As CRAXDRT.Report
> Set rep = appl.OpenReport("c:\mytest.rpt", 1)
> rep.ExportOptions.DiskFileName = "c:\pdf_report.pdf"
> rep.ExportOptions.DestinationType = crEDTDiskFile
> rep.ExportOptions.FormatType = crEFTPortableDocFormat
> rep.Export False

> Can I use OCX Control to export PDF in Visual Basic?

> Problem Two - After I used CRAXDRT object to export PDF, I found out
> the problem. That is:

> In mytest.rpt, it is using UniversCondensed Fonts. So, I exported it
> to a PDF file in my PC (but my PC don't have this fonts).
> It exported to a PDF successfully. When I opened it, the error message
> appears "Unable to find or create the font 'UniversCondensed'. Some
> characters may not display or print correctly."
> If I installed this fonts, it displays very well. But in some reasons,
> I do not want to install this fonts and I can see it well.

> If I'm used a PDF Writer to print this report to a PDF, the PDF do not
> use UniversCondensed Fonts if my PC do not have this fonts. It used a
> Arial Fonts instead of this fonts. So, I can see it very well. In some
> reasons, I cannot use PDF writer to print report to PDF, I MUST use
> CRAXDRT object to export PDF.

> Therefore, I have a question, how can I export to a PDF that the PDF
> file can use a Arial Fonts instead of UniverseCondensed Fonts?
> Can I specify the fonts to export a PDF?

> Thanks a lot!



Sat, 03 Jul 2004 21:32:11 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Problem exporting PDF Files with Crystal Report 8.5

2. Books for Crystal Reports 8.5 and Visual Basic 6.0

3. Crystal Reports 8.5 PDF Export

4. Exporting To PDF, RTF using VB6 (SP4) Crystal 8.5

5. Exporting Crystal Report 85 to PDF from Visual Studio 6.0

6. Problems with crystal 8.5 and vbscript pdf export

7. Export to PDF only from CRviewer (RDC 8.5 - VB 6.0)

8. Export to PDF to stream? Crystal 8.5

9. PDF export error in crystal 8.5 with windows 98

10. Crystal Report 8.5 and Visual Basic 6

11. CR 8.5 Export to PDF perfromance problems etc

12. CR 8.5 export to PDF problem...HELP!

 

 
Powered by phpBB® Forum Software