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

Export report with images to PDF format!!!

Status
Not open for further replies.

mcngan

Programmer
Sep 27, 2002
3
0
0
HK
I have tried to use crystal report 8.5 with VB to export my report with photos to PDF format. The output PDF in general is Ok. However I find that the quality of the photos after printing out is very bad. I can't find any export option in setting the quality of the export file. Anyone can help me. Thank!!!
 
go to Crystal support website. select image quality or something like this. This is a known issue. You should be able to find a document there.

Cheers !

Ted
 
Dear mcngan
i am using Crystal report for VS.Net,and ASP.Net as Client,since there is not utility of exporting a report in any format in web forms,so i am exporting the report manually by using the code:
============================================================

crv.ReportSource = oRpt
SetParameterFields()'function to set parameter fields

Dim crExportOptions As ExportOptions
Dim crDiskFileDestinationOptions As DiskFileDestinationOptions
Dim ExportPath As String
Dim ExportedFileName As String

crDiskFileDestinationOptions = New DiskFileDestinationOptions()
crExportOptions = oRpt.ExportOptions
Select Case cmbExportFormat.SelectedItem.Text 'this contains the value of the selected export format.
Case "Rich Text (RTF)"
'ExportedFileName = "Chart.rpt.rtf"
' crDiskFileDestinationOptions.DiskFileName = ExportPath + "Chart.rpt.rtf"
crDiskFileDestinationOptions.DiskFileName = "C:\filename.rtf"
With oRpt.ExportOptions
.ExportDestinationType = ExportDestinationType.DiskFile
.ExportFormatType = ExportFormatType.RichText
.DestinationOptions = crDiskFileDestinationOptions
End With
Case "Portable Document (PDF)"
' ExportedFileName = "Chart.rpt.pdf"
'crDiskFileDestinationOptions.DiskFileName = ExportPath + "Chart.rpt.pdf"
crDiskFileDestinationOptions.DiskFileName = "C:\filename.pdf"

With oRpt.ExportOptions
.ExportDestinationType = ExportDestinationType.DiskFile
.ExportFormatType = ExportFormatType.PortableDocFormat
.DestinationOptions = crDiskFileDestinationOptions
End With
Case "MS Word (DOC)"
' ExportedFileName = "Chart.rpt.doc"
'crDiskFileDestinationOptions.DiskFileName = ExportPath + "Chart.rpt.doc"
crDiskFileDestinationOptions.DiskFileName = "C:\filename.doc"
With oRpt.ExportOptions
.ExportDestinationType = ExportDestinationType.DiskFile
.ExportFormatType = ExportFormatType.WordForWindows
.DestinationOptions = crDiskFileDestinationOptions
End With
Case "MS Excel (XLS)"
'ExportedFileName = "Chart.rpt.xls"
' crDiskFileDestinationOptions.DiskFileName = ExportPath + "Chart.rpt.xls"
crDiskFileDestinationOptions.DiskFileName = "C:\filename.xls"
With oRpt.ExportOptions
.ExportDestinationType = ExportDestinationType.DiskFile
.ExportFormatType = ExportFormatType.Excel
.DestinationOptions = crDiskFileDestinationOptions
End With
End Select
Try
oRpt.Export()
Catch err1 As Exception

Response.Write(&quot;<br>&quot;)
Response.Write(err1.Message.ToString)
End Try

============================================================


by using this code the report has been exported successfully i-e all the text objects are exported successfully but the data is empty i-e no data is exported.
Can u help me in this regard it's very important and very urgent
u can reply me at ASAP
umair@criss.com.pk
thanks
 
Dear Mcngan/Tedliu/UmairZakai

I'm using Crystal Report 8.5 and VB6. I want to save or export a crystal report with data through code without any human intervention, what do I need to reference my VB application to use the DiskFileDestinationOptions object?

Sample of my code:

Private sub ExportFile(ByVal sFileName as String)
Dim diskOpts As New DiskFileDestinationOptions

mReport.ExportOptions.ExportFormatType =_
ExportFormatType.CrystalReport
mReport.ExportOptions.ExportDestinationType=_
ExportDestinationType.DiskFile

diskOpts.DiskFileName = sFileName
mReport.ExportOptions.DestinationOptions = diskopts
mReport.Export

From the code above, I can't see DiskFileDestinationOptions from the dropdown. I assume there must be a .dll or one of the references that I did not select.

Please help,
I would appreciate it if you guys can let me know as soon as possible.
 
Dear Mcngan

I'm using Crystal Report 8.5 and VB6. I want to save or export a crystal report with data through code without any human intervention, what do I need to reference my VB application to use the DiskFileDestinationOptions object?

Sample of my code:

Private sub ExportFile(ByVal sFileName as String)
Dim diskOpts As New DiskFileDestinationOptions

mReport.ExportOptions.ExportFormatType =_
ExportFormatType.CrystalReport
mReport.ExportOptions.ExportDestinationType=_
ExportDestinationType.DiskFile

diskOpts.DiskFileName = sFileName
mReport.ExportOptions.DestinationOptions = diskopts
mReport.Export

From the code above, I can't see DiskFileDestinationOptions from the dropdown. I assume there must be a .dll or one of the references that I did not select.

Please help,
I would appreciate it if you guys can let me know as soon as possible.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top