General information
Title:
Pass Multiple Parameter Values to CR8.5 with VFP7.0
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
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only