Hi All,
I have an application (VB6 / Access) that I first created a report using Crystal 4.6.
After completion, I then needed to have the user change the SQL statment at runtime.
AS I was unable to get this to work, I then installed Crystal version 8 and converted the reports to version 8.
Unfortunatly, I still canot get it to work.
Below is a sample of the code I have been trying:
This works OK
Select Case True
Case optReports(0)
Dim IS_Report As New IS_Report
frmViewReports.CRViewer1.ReportSource = IS_Report
frmViewReports.CRViewer1.ViewReport
This however, produces the error, file not found:
Select Case True
Case optReports(0)
Dim IS_Report As New IS_Report
Dim strSQL As String
strSQL = "SELECT qryTotalByMonth.`dDate` FROM `qryTotalByMonth` qryTotalByMonth WHERE (((qryTotalByMonth.`dDate`) = #1/31/2001#))"
IS_Report.Database.Tables.Item(1).SetLogOnInfo App.Path & "\Values97.mdb", "", "", ""
IS_Report.Database.Tables.Item(1).Location = "qryTotalByMonth"
IS_Report.SQLQueryString = strSQL
frmViewReports.CRViewer1.ReportSource = IS_Report
frmViewReports.CRViewer1.ViewReport
Any advice on this would be greatly appreciated.
Regards,
I have an application (VB6 / Access) that I first created a report using Crystal 4.6.
After completion, I then needed to have the user change the SQL statment at runtime.
AS I was unable to get this to work, I then installed Crystal version 8 and converted the reports to version 8.
Unfortunatly, I still canot get it to work.
Below is a sample of the code I have been trying:
This works OK
Select Case True
Case optReports(0)
Dim IS_Report As New IS_Report
frmViewReports.CRViewer1.ReportSource = IS_Report
frmViewReports.CRViewer1.ViewReport
This however, produces the error, file not found:
Select Case True
Case optReports(0)
Dim IS_Report As New IS_Report
Dim strSQL As String
strSQL = "SELECT qryTotalByMonth.`dDate` FROM `qryTotalByMonth` qryTotalByMonth WHERE (((qryTotalByMonth.`dDate`) = #1/31/2001#))"
IS_Report.Database.Tables.Item(1).SetLogOnInfo App.Path & "\Values97.mdb", "", "", ""
IS_Report.Database.Tables.Item(1).Location = "qryTotalByMonth"
IS_Report.SQLQueryString = strSQL
frmViewReports.CRViewer1.ReportSource = IS_Report
frmViewReports.CRViewer1.ViewReport
Any advice on this would be greatly appreciated.
Regards,