Hallo, I'm working with VB 6 and crystal 11.2 Iwoild like to export a report direct without looking at it or printing. Who can help. My code follows: Set crApplication = New CRAXDRT.Application
Set crReport1 = crApplication.OpenReport(App.Path & "\BerichteCrystal10\ElsterBilanzAPGV.rpt", 1)
crReport1.DiscardSavedData
crReport1.Database.SetDataSource adoRS
'CRViewer1.ReportSource = crReport1
'CRViewer1.ViewReport
If fs.FolderExists(Pfad & "\Elster" & FirmenNr & "") = False Then
fs.CreateFolder (Pfad & "\Elster" & FirmenNr & "")
End If
If fs.FolderExists(Pfad & "\Elster" & FirmenNr & "\Elster" & Bilanzjahr) = False Then
fs.CreateFolder (Pfad & "\Elster" & FirmenNr & "\Elster" & Bilanzjahr)
End If
If fs.FileExists(Pfad & "\Elster" & FirmenNr & "\Elster" & Bilanzjahr & "\ElsterBilanz_" & Bilanzjahr & ".ttx") = True Then
fs.DeleteFile (Pfad & "\Elster" & FirmenNr & "\Elster" & Bilanzjahr & "\ElsterBilanz_" & Bilanzjahr & ".ttx")
End If
Dim FileName As String
FileName = "" & Pfad & "\Elster" & FirmenNr & "\Elster" & Bilanzjahr & "\ElsterBilanz_" & Bilanzjahr & ".ttx" crReport1.ExportOptions.FormatType = crEFTTabSeparatedText
crReport1.ExportOptions.DestinationType = crEDTDiskFile
crReport1.ExportOptions.DiskFileName = FileName
crReport1.Export
Many thanks in advance from Germany SMOKY
------------- smoky
|