
CR with password protected Access MDB...
well according to Seagate...
public app as application
public rep as report
private sub command1_click()
dim pwd as string
set app = createobject("crystal.crpe.application")
set rep = app.openreport("drive:\path\reportfile.rpt")
rep.database.tables(1).setsessioninfo " ", chr(10) & "database level
password"
end sub
http://www.seagatesoftware.com/kbase/ try doing a search on password and
look for this title
6.0: How to report off Database level Password using OLE Automation
good luck
Quote:
> I am using an Access database with password protected. I tried to use the
> following code to do a report previewing,
> With rptDC 'rptDC is the CR Object
> .ReportFileName = gsReportLoc & "rptdc.rpt"
> .DataFiles(0) = gsDatabase
> .UserName = "admin"
> .Password = vbcDBPWD
> .SQLQuery = sSQL
> .Destination = crptToWindow
> .Action = 1
> End With
> Error comes out when hitting the line saying Action=1. It complains the
> log on parameters are incorrect. Can you help?
> --
> Norman Leung
> Software Support Manager
> Eastman Software Division
> Kodak (FE) Ltd.
> 321 Java Road,
> North Point,
> Hong Kong.
> Tel: (852) 2564-9786
> Fax:(852) 2562-4258