Crystal report generate report containing image from database BLOB

375 views Asked by At

our company has a VB6 program that uses crystal report CRAXDRT9.dll v9.2.0.448 to generate report, yes we are using Crystal Report 9.

so today I am trying something new, inserting image into the report from database BLOB field. I have tried putting both bmp and jpg image file into the BLOB field, both of them can successfully show the image in Crystal Report application while editing the rpt file and Preview, or when exporting a pdf file from the Crystal Report application.

However when I put everything to the report system, where there are some job scheduling, submitting stuff, and the last leg was a small VB program that uses the dll to generate the report, everything else was fine, even data from the same table can be shown, but not the image in the final exported pdf file.

May I know if there is any specific settings I have to configure while I perform this type of action?

code excerpt from the VB program I believe is related to report export settings

Set crxReport = New CRAXDRT.Report
.
.
Select Case datPrimaryRS.Fields(conExportTypeColumn)
    Case 0 'PDF
        crxExportOptions.DestinationType = crEDTDiskFile
        crxExportOptions.FormatType = crEFTPortableDocFormat
        crxExportOptions.DiskFileName = txtFileName ' grdDataGrid.Columns(conExportPathColumn) & grdDataGrid.Columns(conExportNameColumn)
        crxReport.Export False

Frankly, it seemed to me simply choosing pdf export type and export to local disk, I don't see much else, perhaps it is some other settings that are missing?

enter image description here

0

There are 0 answers