Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Pass Parameters to Crystal Report 8.5 with VFP7.0
Message
From
30/01/2003 02:36:22
Walter Meester
HoogkarspelNetherlands
 
 
To
13/01/2003 09:19:59
General information
Forum:
Visual FoxPro
Category:
Crystal Reports
Miscellaneous
Thread ID:
00740960
Message ID:
00747037
Views:
25
>How can i pass one or more parameters to a Crystal Report Through VFP7.0?

To all,

This is the solution I use succefully for about four years now:
WITH THIS.Report.ParameterFields
	FOR nT= 1 TO .Count
		cName=STRTRAN(STRTRAN(STRTRAN(.Item(nT).Name,"{",""),"}",""),"?","")

		IF TYPE(cName) # "U"
			cType=TYPE(cName)
			nType=0
			DO CASE 
				CASE cType="C"
					nType=12

				CASE cType="D"
					nType=10
					
				CASE cType="N"
					nType=7
				
				CASE cType="M"
					nType=14
					
				CASE cType="L"
					nType=9
			ENDCASE
			xValue=IIF(cType="C",LEFT(EVAL(cName),250), EVAL(cName))
			IF nType = 0
				.item(nT).SetCurrentValue(xValue)
			ELSE
				.item(nT).SetCurrentValue(xValue, nType)
			ENDIF
		ENDIF			
	ENDFOR
ENDWITH
Previous
Reply
Map
View

Click here to load this message in the networking platform