Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Crystal 7 & picture from General field
Message
From
30/03/2000 12:10:55
Walter Meester
HoogkarspelNetherlands
 
 
To
30/03/2000 10:30:36
General information
Forum:
Visual FoxPro
Category:
Reports & Report designer
Miscellaneous
Thread ID:
00352728
Message ID:
00352786
Views:
10
Irina,

You can't ! The best thing you could accomplish is to write the picture to a predefined file and insert an OLE Object on the report and change the picture at runtime.

To my knowledge it is only possible to change the picture with the RDC automation approach through the FormattedPicture picture property of the OLE object. See the developers help and search for picture and OLE.

It is certainly not going to be easy.

To help you for a jump start in the RDC automation approach:
1. Make a new form and add the Crystal Report smart viewer activeX control to the form. MAke it big enough: this iwhere the preview in going to be displayed in.
2. add a command button to the form and put the following in the click event
  x=createobject("CrystalRuntime.application")
  rep=x.openreport(cReport,1)
  rep.EnableParameterPrompting=.F.

  THISFORM.Rep=Rep
3. Now you'll have to figure out how to adress the OLE control in the report. It is somewhere in the objecthierarchy in one of the sections. Each section generates a format event (Can be captured with the VFPCOM utility available from the MS VFP home site)

4. Within this event you can change the picture in the report in the following manner:
Picture1.FormattedPicture = LoadPicture("Xtreme.bmp")
5. Now you can display the report in the activeX viewer
  THISFORM.CrViewer.ReportSource=rep
THISFORM.CrViewer.Viewreport()



To be honest I've never done this before, so the actual procedings might be slightly different. I know that there were made some improvements in CR 8, but I don't know what from the top of my head.

You also might search here for the keywords Crystal and Picture, there are others who had the same question as you do, I don't recall if they found a suitable solution.

Good luck, and let me know what you've come up with.

Walter,

>How can I insert a picture from VFP General field into Crystal Report?
>Any help will be greatly appreciated.
>
>Irina
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform