Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Crystal Report
Message
De
30/01/2000 15:07:38
Walter Meester
HoogkarspelPays-Bas
 
 
À
30/01/2000 13:19:19
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire de rapports & Rapports
Titre:
Divers
Thread ID:
00324615
Message ID:
00324845
Vues:
46
Roni,

First of all it is best to use the automation server approach instead of the Crystal REports ActiveX control. This one provides more power and flexibility.

Within the automation server approach you can use the following code to pass the parameters trough:

NOTE: this example works for CR 6.0 and up, I Don't know i it works for previous versions.
oEngineObject=CREATEOBJECT("Crystal.CRPE.Application")

oReport=oEngineobject.openreport(cReportname)
oReport.ParameterPromptingEnabled=.F.

* Set optional parameterfields
* Each parameterfield has a name. If this name match an existing VFP variable
* Then pass the value of this variable to the parameterfield of the report.
* note that the VFP variables used for these paramaters must be declared either Public or 
* Private in the calling method.

WITH oReport.ParameterFields
	FOR nT= 1 TO .Count
		cName=.Item(nT).ParameterFieldName
		IF TYPE(cName) # "U"
			.item(nT).SetCurrentValue(EVAL(cName))
		ENDIF
	ENDFOR
ENDWITH
For more documentation about the automation server approach see help.

Walter,

>Hallo Walter!
>Can you explain how to send parameters from VFP.
>If you can with example.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform