This is the sort of thing you may need
Sorry the formatings to pot but they have changed this site layout. The report to be run is set into a var and in the section marked ##### the report is sent to crystal fro printing but as a text file, in this app the report is printed out to disk as a text file. I cant see why you could not do this with the html options as well.
Regards Dave
'Set the path to the report
Select Case UCase(arrstrReportOptions(11))
Case "RETAIL"
strReportPath = mstrReportsPath & "PortWorthRetail.rpt"
Case "CORPORATE"
Select Case strCurrentType
Case "M" 'Group Members
strReportPath = mstrReportsPath & "PortWorthCorpTeam.rpt"
Case "G" 'Group
strReportPath = mstrReportsPath & "PortWorthCorp.rpt"
End Select
End Select
MDIMain.CrystalReport.ReportFileName = strReportPath
'Discard saved data
MDIMain.CrystalReport.DiscardSavedData = True
'Set the report parameters
MDIMain.CrystalReport.StoredProcParam(0) = strPeriod 'Report Period
MDIMain.CrystalReport.StoredProcParam(1) = strRegionCode 'Region Code
MDIMain.CrystalReport.StoredProcParam(2) = arrstrReportOptions(8) 'Area Code
MDIMain.CrystalReport.StoredProcParam(3) = arrstrReportOptions(9) 'Branch Code
MDIMain.CrystalReport.StoredProcParam(4) = arrstrReportOptions(10) 'Manager Code
'Set the number of StoredProcParam's opened
mintProceduresOpen = 5
'Set report destination
If UCase(arrstrReportOptions(15)) = "PRINTER" Then
MDIMain.CrystalReport.Destination = crptToPrinter
Else ######
strReportPath = Left$(strReportPath, Len(strReportPath) - 3) & "txt"
MDIMain.CrystalReport.PrintFileName = Left$(strReportPath, Len(strReportPath) - 3) & "txt"
MDIMain.CrystalReport.PrintFileType = crptText
MDIMain.CrystalReport.Destination = crptToFile
End If
Dave
dab@completebs.com
See website for more info but we can develop most things for most people.