I've just discovered another way to do it:Download this document from the Crystal web site:VB Code:
Option Explicit Dim Report As New CrystalReport1 [color=red]Dim crProp As CRAXDRT.ConnectionProperties[/color] Private Sub Form_Load() Screen.MousePointer = vbHourglass [color=red]Set crProp = Report.Database.Tables(1).ConnectionProperties crProp.Item("Database Name") = App.Path & "\mydb.mdb" crProp.Item("Database Password") = "mypassword"[/color] Report.RecordSelectionFormula = "{mytable.myfield}='condition'" CRViewer91.ReportSource = Report CRViewer91.ViewReport Screen.MousePointer = vbDefault End Sub
http://support.businessobjects.com/c...erties.pdf.asp
It explains it all pretty well.




Reply With Quote