I have a VB application that has Crystal Reports integrated into it. The code below causes the report object that I am currently using to be saved to a specific name “SaveReport.RPT” in the current application path. Could somebody help me modify this code so that when the button is clicked it will open up a common dialog box (defaulted to the current App path) and prompt the user for a file name to save the report to? I also need it to warn if there is a file that exists already with the proposed file name.
Private Sub cmdSave_Click()
m_Report.SaveAs App.Path & "\SavedReport.RPT", cr80FileFormat
MsgBox "Report has been saved as SavedReport.RPT in" & vbCrLf & App.Path, vbInformation