I have completed 95% of a VB application that will open in a folder list all the Crystal Reports (Standalone not .dsr) ,let me select which ones I want, change the record selection via hardcode and two datepickers (start and end date). I have some reports that use Sql Server tables and some that use Visual FoxPro. I can use logonserver for my sql tables thru a dsn. I have a dsn for Visual FoxPro tables. but can't get logonserver to work for them.
Error--- "Server not opened yet..."
Do Visual FoxPro tables need a different sytax?
code is as follows
Set rdApp = CreateObject("CrystalRuntime.Application.8"
For a = 1 To Prints.ListItems.Count
If Prints.ListItems(a).Checked = True Then
Set rpt = rdApp.OpenReport(Prints.ListItems(a).SubItems(1))
rpt.RecordSelectionFormula = "Recordselection Criteria"
rpt.DiscardSavedData
rpt.Database.LogOnServer "p2sodbc.dll",DSNName,
,userid,password
rpt.PrintOut (False)
Set rpt = Nothing
End If
next a
Set rdApp = Nothing
This code works for the Sql Server tables
I do not include userid or password for visual foxpro
since there are none
any suggetions?
Error--- "Server not opened yet..."
Do Visual FoxPro tables need a different sytax?
code is as follows
Set rdApp = CreateObject("CrystalRuntime.Application.8"
For a = 1 To Prints.ListItems.Count
If Prints.ListItems(a).Checked = True Then
Set rpt = rdApp.OpenReport(Prints.ListItems(a).SubItems(1))
rpt.RecordSelectionFormula = "Recordselection Criteria"
rpt.DiscardSavedData
rpt.Database.LogOnServer "p2sodbc.dll",DSNName,
,userid,password
rpt.PrintOut (False)
Set rpt = Nothing
End If
next a
Set rdApp = Nothing
This code works for the Sql Server tables
I do not include userid or password for visual foxpro
since there are none
any suggetions?