?
Solved

Dynamically load pictures in report

Posted on 2005-04-16
10
Medium Priority
?
296 Views
Last Modified: 2008-01-09
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
0
Comment
Question by:ISS_Expert
10 Comments
 
LVL 77

Accepted Solution

by:
peter57r earned 300 total points
ID: 13800249
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
 
LVL 101

Expert Comment

by:mlmcc
ID: 13801244
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
 
LVL 1

Author Comment

by:ISS_Expert
ID: 13803653
But to use VB to load the pics, I need to use the embedded version (VB) of Crystal Reports right?
0
Prep for the ITIL® Foundation Certification Exam

December’s Course of the Month is now available! Enroll to learn ITIL® Foundation best practices for delivering IT services effectively and efficiently.

 

Expert Comment

by:dkirk2003
ID: 13804444
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
 
LVL 19

Expert Comment

by:GJParker
ID: 13804611
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
 
LVL 1

Author Comment

by:ISS_Expert
ID: 13813964
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
 
LVL 19

Expert Comment

by:GJParker
ID: 13813992
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
 
LVL 1

Author Comment

by:ISS_Expert
ID: 13814662
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
 
LVL 19

Assisted Solution

by:GJParker
GJParker earned 200 total points
ID: 13815414
Well then you will need to import the report into the project to use this method.

Gary
0
 
LVL 1

Author Comment

by:ISS_Expert
ID: 13821367
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

Featured Post

Prep for the ITIL® Foundation Certification Exam

December’s Course of the Month is now available! Enroll to learn ITIL® Foundation best practices for delivering IT services effectively and efficiently.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Crystal Reports: 5 Tests for Top Performance It is complete, your masterpiece report.  Not only does it meet your customer’s expectations, it blows them out the water, all they want is beautifully summarised and displayed in a myriad of ways. …
Hot fix for .Net Crystal Reports 10.2.3600.0 to fix problems with sub reports running on 64 bit operating systems ISSUE: Reports which contain subreports fail with error "Missing Parameter Value" DEPLOYMENT SERVER OS: Windows 2008 with 64 bi…
Please read the paragraph below before following the instructions in the video — there are important caveats in the paragraph that I did not mention in the video. If your PaperPort 12 or PaperPort 14 is failing to start, or crashing, or hanging, …
Whether it be Exchange Server Crash Issues, Dirty Shutdown Errors or Failed to mount error, Stellar Phoenix Mailbox Exchange Recovery has always got your back. With the help of its easy to understand user interface and 3 simple steps recovery proced…
Suggested Courses
Course of the Month14 days, 19 hours left to enroll

839 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question