Click here to Skip to main content
15,887,214 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have created a report on visual studio. The font needed was "Adobe Arabic" so I installed it and add it to fonts in my windows 7 control panel. Now the newly added font can be used in crystal reports Visual studio, word, excel etc... But when I was trying to export my report to PDF an internal error was thrown by VS: Selected exporter does not support Font used in this report. So, Am I missing something another modification that allows me to export my crystal report to PDF without errors and with the new font? I am saying that because I opened this report from crystal report viewer, then I tried to export it and I got as a result: file created but could not be opened because it contains errors. Below is my code:
VB.NET
Dim crExportOptions As ExportOptions

Dim CrDiskFileDestinationOptions As New DiskFileDestinationOptions()
' CrDiskFileDestinationOptions.DiskFileName = "C:\crystalExport.docx"
CrDiskFileDestinationOptions.DiskFileName = "C:\crystalExport.pdf"
crExportOptions = SurReportDocument.ExportOptions

With crExportOptions
    .ExportDestinationType = ExportDestinationType.DiskFile
    .FormatOptions = New PdfRtfWordFormatOptions
    '.ExportFormatType = ExportFormatType.WordForWindows ' word
    .ExportFormatType = ExportFormatType.PortableDocFormat  ' pdf
    .DestinationOptions = CrDiskFileDestinationOptions

End With
SurReportDocument.Export()


What I have tried:

I have tried also:
- Export to word document: failed
- create word with Adobe Arabic text font and save it as PDF: succeed
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900