Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Any Crystal Report Gurus?
Message
From
16/05/2002 16:41:31
 
General information
Forum:
Visual FoxPro
Category:
Third party products
Miscellaneous
Thread ID:
00657026
Message ID:
00657779
Views:
29
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)
>
>
>My parameter field is used in the WHERE clause of the record selection formula (this report pulls from SQL Server, but I can't see why it would be different if pulling from a VFP DBC). If I use this, it pulls oen record, the one where the field value=23456. If I alter the '23456' to '12345' I get the one record where the field value=12345.
>
> I'm still experimenting with the SQL Server logon, I might not need the call to SetLogonInfo for it to work, but that's the code segment I have now and it works with the parameter. No prompts appear, just the report with the data. Speaking of which - make sure you didn't save the data with the report, it's a checkbox under File,Report Options in 8.x, maybe it was the same in 6.
>
> Randy
>
>>OK I have the 8.5 Professional Version now and I still cant get it to work.
>>
>>Do you have some sample code I could look at?
>>
>>I would hate to have to remove that Parameter from the report.
>>
>>Ron
>>
>>>>Ron
>>>>
Craig Berntson
MCSD, Microsoft .Net MVP, Grape City Community Influencer
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform