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 18:04:05
Sasha Burkich
Senior Systems Analyst
British Columbia, Canada
 
 
To
14/01/2003 09:18:42
General information
Forum:
Visual FoxPro
Category:
Crystal Reports
Miscellaneous
Thread ID:
00741397
Message ID:
00741675
Views:
18
Hi Anthi,

instead of this:

oParm =ocPArm.Item(1)
oParm.AddCurrentValue('010')

try this:
ocPArm.ParameterFields(1).AddCurrentValue('010')


HTH,

Sasha

>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()
Sasha Burkich
Consultant
Victoria, BC
Previous
Reply
Map
View

Click here to load this message in the networking platform