VB Code:
subEmptyCrystal
With frmLogo.CrystalReport1
If sSQL <> "" Then .SelectionFormula = sSQL
.WindowTitle = "MyReport"
.Formulas(0) = "Money=' " & strMoney & "'"
.DataFiles(0) = App.Path & "\MyDatabase1.Mdb"
.DataFiles(1) = = App.Path & "\MyDatabase2.Mdb"
.DataFiles(2) = = App.Path & "\MyDatabase3.Mdb"
.ReportFileName = App.Path & "\MyRaport.rpt"
.Action = 1
End With
Allways empty Crystalreport variables befor You giving Newones
Like calling sub ..
Public Sub subEmptyCrystal()
Dim i As Integer
With CrystalReport1
For i = 0 To 100
.SortFields(i) = ""
.Formulas(i) = ""
Next
.PrinterCopies = 1
.Destination = 1
.SelectionFormula = ""
.WindowTitle = ""
.ReportTitle = ""
For i = 0 To 100
.DataFiles(i) = ""
Next
End With
End sub