The sample code below is using the RDC. Note that the following line is not needed and can be removed from the code sample:
crReport=createobject("crystalruntime.report")
>Now I'm confused. I definitely want to be using the RDC. Am i using the RDC, or CRPE? Based on the runtime DLLs i needed to install to make this work, I THINK I'm using the RDC.
> And I thought I finally had this all figured out..
>
>Randy
>
>>This code shows why it works for you. CrystalRuntime.Application is the RDC does not exist in CR 6.0 and will not work if using the automation server under 8.5, which both use the CRPE. Pronounce it and you'll see why the RDC is the preferred method of Crystal integration.
>>
>>
>>>Sure, here goes:
>>>
>>>crApp=createobject("crystalruntime.application")
>>>crReport=createobject("crystalruntime.report")
>>>crReport=crApp.openreport('myreport')
>>>crApp.LogOnServer('p2ssql','sqlsrvr','database','user','pwd')
>>>crReport.Database.Tables.Item(1).SetLogOnInfo('sqlsrvr','database','user','pwd')
>>>crReport.ParameterFields(1).AddCurrentValue('23456')
>>>crReport.PrinterSetup(0)
>>>
>>> Randy
>>>
Craig Berntson
MCSD, Microsoft .Net MVP, Grape City Community Influencer