Dynamically load pictures in report

Hi all,

I need to dynamically load pictures in my crystal report.  Using BLOB field is simple but the database will get bloated very quickly and also writing code to upload the picture from my VB application would be tedious.  Is there a better way of doing it?  Can I store only the path to the picture in the database and load it in my report?  I'm using CR 10.

Thanks in advance,
ASM
LVL 1
ISS_ExpertAsked:
Who is Participating?
 
peter57rCommented:
Hi ISS_Expert,

Can't be done from within CR until  V11

Example using VB here:
http://support.businessobjects.com/communityCS/FilesAndUpdates/cr9_vb_rdc_loadpic.exe.asp


Pete
0
 
mlmccCommented:
Pete is correct.  Until CR11 (CR XI) you can't accomplish what you want without storing the pics in the database or using VB to load them.

mlmcc
0
 
ISS_ExpertAuthor Commented:
But to use VB to load the pics, I need to use the embedded version (VB) of Crystal Reports right?
0
Cloud Class® Course: CompTIA Healthcare IT Tech

This course will help prep you to earn the CompTIA Healthcare IT Technician certification showing that you have the knowledge and skills needed to succeed in installing, managing, and troubleshooting IT systems in medical and clinical settings.

 
dkirk2003Commented:
We have managed to do this in Crystal 8 but we had to buy a third party bit of software.  It worked by taking the unc path of where the picture was stored and would dynamically load it at run time.  Works very well but had to purchase the software.
0
 
GJParkerCommented:
ISS_Expert

If you're using VB you don't need to use the version embedded with VB. Crystal Developer and advanced editions install with developemnt controls which can be used to access report methods and properties.

You could also use something like CViewImage found at http://www.chelseatech.co.nz/ctprod.htm#cViewIMAGE if you don't want to do the development.

Hope this helps

Gary
0
 
ISS_ExpertAuthor Commented:
Hi Gary,

How do I go about inserting the picture through VB?  I am using CR viewer control and Crystal report activex designer run time library 10 in my VB program.  I can't find any property in CRAXDRT.Report which can be used to access the picture object in my report.

Thanks in advance,
ASM
0
 
GJParkerCommented:
If you look at this link provided above

http://support.businessobjects.com/communityCS/FilesAndUpdates/cr9_vb_rdc_loadpic.exe.asp

it demonstartes how to do this. basically you insert the image into the report and use the section_format method

Private Sub DetailSection1_Format(ByVal pFormattingInfo As Object)

  Dim picFile As String
 
    On Error GoTo Error_Handler
   
    picFile = "C:\Myimage.jpg" ' change this to the path of the image you want to display

    Set objImage.FormattedPicture = LoadPicture(picFile)
   
Exit Sub

Hope this helps

Gary
0
 
ISS_ExpertAuthor Commented:
I am not using the embedded version of Crystal in VB and so I don't have the section_format method.  I have created the report using CR developer edition and all I am only firing the report from VB.
0
 
GJParkerCommented:
Well then you will need to import the report into the project to use this method.

Gary
0
 
ISS_ExpertAuthor Commented:
Gary,  I don't want to import the report into the project.

I'll just use a blob field instead.

Thanks for your responses guys!

ASM
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.