Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Crystal Reports--Gen Field from file named in a text fie
Message
De
25/04/2002 02:40:06
Walter Meester
HoogkarspelPays-Bas
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Produits tierce partie
Divers
Thread ID:
00648957
Message ID:
00649001
Vues:
18
Hi lynette,

It is not possible to reference pictures in FOX general fields in CR 8.5. There are no signs this is going to change in version 9.

There is only one reliable way to dynamicly put pictures on a crystal report. This applies to VFP 7 and possibly to VFP 6.

In short:
1. Use Crstyal Report 7.0 or up.
2. Use the RDC autmation controller in combination with the ActiveX smartviewer control.
3. Bind the format event of the section containing the OLE object to a custom VFP object to handle the format event. In VFP 7, this can be done with the EVENTHANDLER function. In VFP the same should be possible with the BINDEVENTS function of the VFPCOM.dll available from the VFP homepage.
4. In this format event, use LOADPICTURE to load the picture referenced by another field on the report (eg: x=LOADPICTURE(oReport.Secions.iTem[5].Reportobjects("Text1").Value)). Then use the formattedpicture property of the OLEOBJECT to change the default picture (eg: oReport.Sections.item[5].ReportObjects["Picture1"].FormatedPicture = x)

I've written a class to handle this quite transparently from the rest of the report handling. Unfortunately this class is written for my personal framework and is dutch oriented (for a part). I should translated this and take it out of the framework before I could post this as a solution in the files section.

Walter,



>Does anyone know how to programmatically (or from the command prompt) fill a general field with a file name listed in a text field?
>
>Thanks for any help. I have file names for images listed in a text field and VFP can view them fine like that, but Crystal Reports 8.5 can't deal with the file names so I need to create a temporary table that has the unique id and a general field and translates the file name to an embedded image in the general field.
>
>The alternative is to have a default.jpg file and copy the file via the filename stored in the table to default.jpg before each record is printed, seems like it would be a very slow process that way and I'm not sure how to accomplish that from within Crystal Reports since this report will be run from Crystal and not from within VFP when done in-house.
>Thanks for ANY help!
>
>Lynette
>
>PS -- will Crystal Reports 9 be able to deal with unique images for records that are stored as file names in a table's field?
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform