Hi,
I'm Using DAO to connect CR & Excel file.
From Vb,I have to pass file location, for that I'm using the following code...
It is working fine...Now I want to protect the Excel file with password..VB Code:
crDoc.Load(RptName) crTables = crDoc.Database.Tables For Each crTable In crTables crTable.Location = BookLocation Next c = crDoc.Subreports.Count For i = 0 To c - 1 SubDoc = crDoc.Subreports.Item(i) SubTables = SubDoc.Database.Tables For Each SubTable In SubTables SubTable.Location = BookLocation Next Next
How can i pass the password to the Crystal Report..any idea??
I tried as follows...but got error...
BUt it gives error as :VB Code:
Dim myLogin As TableLogOnInfo For Each crTable In crTables myLogin = crTable.LogOnInfo With myLogin.ConnectionInfo .DatabaseName = BookLocation .UserID = "Admin" End With crTable.ApplyLogOnInfo(myLogin) Next
Logon failed
Unable to connect: incorrect logon parameters
And, I read somewhere that, if DAO is used for coneection then the ApplyLogonInfo method will not work..Is it True?...
I'm struck with this problem...i've to finish this by this week...Help me,quickly
