|
-
Aug 23rd, 2004, 12:46 AM
#1
Thread Starter
Fanatic Member
SetLogOnInfo ( Resolved )
I am using the following function to set the datapath of the tables used in a crystal report at runtime.
access is being used as the database
the SetLogOnInfo statement is not working.
Set rep_application = Nothing
Set rep_application = New CRAXDRT.Application
Dim rep As New CRAXDRT.Report
Set rep = rep_application.OpenReport(App.Path & "\reports\" & RepName, crOpenReportByTempCopy)
rep.VerifyOnEveryPrint = True
Dim DataPath As String
DataPath = "c:\myapp\database\"
dim password as string
password="mypassword"
Dim counter As Integer
Dim str_DataFile As String
Dim DataFiles As New CRAXDRT.DatabaseTables
Set DataFiles = rep.Database.Tables
For counter = 1 To DataFiles.count
str_DataFile = returnFileName(DataFiles(counter).Location) '' this returnFileName function returns the filename from the fullpath
DataFiles(counter).SetLogOnInfo "msaccess", DataPath & str_DataFile, , password
Next
SmartViewer.ReportSource = rep
SmartViewer.ViewReport
Last edited by vishalmarya; Nov 6th, 2004 at 10:46 AM.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|