Hi!
Please help on the following issue :
I've a password protected access 2000 database.
I want to connect to a report already prepared in crystal report 8.5 where the parameter would go from my form.
For eg. if i'm supplying a specific EMP ID, the vb application will do all the caslculations and will send to a specific table and the job of the crystal report is to show that report but i want the report to show the name of the employee and other details in the report which are not present in the table and i've to collect from my vb application.
I know i can use formula but the mail problem is i can't connect the password protected database.
Again i would like to know how can i use DSN so that where ever my application is loaded any m/c from LAN can locate my report.
I'm pasting a piece of code which i used previously :
'ct1 is the crystal report ocx
ct1.ReportFileName = "D:\I B A\rpt_genealogy.rpt"
'ct1.SelectionFormula = "{DISTRIBUTOR_DETAIL_TABLE.DISB_ID} = " & "'" & d & "'"
ct1.Formulas(0) = "f1= " & "'" & UCase(CStr(rs1!Name)) & " Associate Id : " & Text3 & "'"
ct1.DataFiles(0) = "D:\I B A\BUSINESS_SYSTEM.mdb"
ct1.WindowParentHandle = frmgenelogy.hWnd
ct1.Action = 0
ct1.DiscardSavedData = True
ct1.Destination = crptToWindow
but this time the database was not password protected and now the connection string looks like the following which i think will give you the idea what i'm after :
'connect_string is global variable and the following piece of code is in the sub main of my application
' con is the adodb connection
Connect_String = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & app.path & "\MLM SYSTEM\mlmdatabase.mdb;Persist Security Info=False;Jet OLEDBatabase Password=PASSWORD123"
Con.ConnectionString = Connect_String
Con.Open


atabase Password=PASSWORD123"
Reply With Quote