Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Pass Multiple Parameter Values to CR8.5 with VFP7.0
Message
From
14/01/2003 09:18:42
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Crystal Reports
Title:
Pass Multiple Parameter Values to CR8.5 with VFP7.0
Miscellaneous
Thread ID:
00741397
Message ID:
00741397
Views:
66
I am trying to pass multiple Values To a Report Parameter using The code that Follows and i get the Error:

"OLE error code 0x8002006: Unknown Name "
When the code goes here: 'oParm.AddCurrentValue('010')'

Am i using the wrong Method? What goes wrong? Is there another method i should use?

any ideas?

Tnx



*!*!*!*!*Code*!*!*!*!*!*
LOCAL oCR AS CRAXDRT.Application
LOCAL oRpt AS CRAXDRT.Report
LOCAL oDB AS CRAXDRT.Database
LOCAL ocDBT AS CRAXDRT.DatabaseTables
LOCAL oDBT AS CRAXDRT.DatabaseTable
LOCAL ocParm AS CRAXDRT.ParameterFieldDefinitions
LOCAL oParm AS CRAXDRT.ParameterFieldDefinition

oCR = CREATEOBJECT("crystal.crpe.Application")
oRpt = oCR.OpenReport("\\Hadjistyllialt\c\Crystal_report_Testing\Reports\mULTIPLEParameter_Report.rpt")


* Create the Database object
oDB = oRpt.Database()

* Get a references to the DatabaseTables collection
ocDBT = oDB.Tables()

* Get a reference to the DatabaseTable object for table 1
oDBT = ocDBT.Item(1)

* This one works for a DSN
oDBT.SetLogOnInfo("HaDJISTYLLIALT_IMDBNEW")

IF oRPt.HasSavedData
oRPT.DiscardSavedData()
ENDIF

* Get the Special Message Parameter
ocParm = oRpt.ParameterFields()
oParm =ocPArm.Item(1)
oParm.AddCurrentValue('010')
oParm.AddCurrentValue('011')
ORpt.Preview()
Next
Reply
Map
View

Click here to load this message in the networking platform