Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Crystal 8 and ODBC
Message
From
04/04/2000 12:07:31
Walter Meester
HoogkarspelNetherlands
 
General information
Forum:
Visual FoxPro
Category:
Reports & Report designer
Miscellaneous
Thread ID:
00354419
Message ID:
00355017
Views:
31
Riley,

What are you trying to do ? ODBC and the parameterfields are totally unrelated. I've not done serious development with the RDC automation server (I use the CRPE automation server) so I can't check the following in an easy way.

According to the developers help something like this should work
FOR nt = 1 TO oReport.ParameterFieldDefinitions.count
    cName = oReport.ParameterFieldDefinitions(nT).name
    if type(cname) # "U"
        oReport.ParameterFieldDefinitions(nT).Setcurrentvalue(eval(cname))
    endif
ENDFOR
The example you've found (regarding parameterfields) in one of my messages is related to the CRPE automation server whereas you're are using the RDC automation controller (which is preferred as the CRPE automation server is being discontinued).

Good luck,

Walter,



>I copied your message # 324845 to Roni Mordehi where you showed some code for calling a Crystal report from VFP6. To my delight I got that to work but I can not get the parameter portion to function. Do I need to have a section that performs my ODBC connection? I am using Oracle on the back end. I can uncoment the parameter area but it does not change the results of my report. I noticed that when I run the report from inside the report designer and do a refresh it prompts me to login to the server each time, thus my question about making a connection frist???? Thank you.
>
>oEngineObject=CREATEOBJECT("Crystal.CRPE.Application")
>oReport=oEngineobject.openreport("D:\50adev\rms\rpt\custrept\crtestrpt.rpt")
>oReport.ParameterPromptingEnabled=.t.
>oReport.PrintWindowOptions.HasRefreshButton=.t.
>oReport.database.tables.Item(1).SetLogoninfo "oracle73",WSPD,WSPD (produces a systax error)
>public rank
>store ' ' to rank
>@ 10,10 get rank pict '@!'
>read
>*!* set step on
>*!* with oReport.ParameterFields
>*!* for nt=1 to .count
>*!* cname=.item(nt).parameterfieldname
>*!* if type(cname) # "U"
>*!* .item(nt).Setcurrentvalue(eval(cname))
>*!* endif
>*!* endfor
>*!* endwith
>oReport.preview
>wait
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform