I have seen alot of messages and still don't have the answer I am looking for.
VB6 with access backend
Need to be able to create CR Reports and print them via VB6, but need to be able to push the path to the report.
Example code that prints CR Report, but I can't change the path if someone creates the reports and doesn't have the right path.
VB Code:
Dim objReport As Crystal.CrystalReport Set objReport = Me.CrystalReport1 Dim strReport As String Dim strTemp As String Dim strSQL As String strSQL = "SELECT tblTempBidPrice.* " strSQL = strSQL & "FROM tblTempBidPrice;" strReport = Me.dgridReport.Columns(2) ' Stores the Path strReportName = Me.dgridReport.Columns(3) ' Sote ReportName strTemp = gconAppl.Properties.Item("Data source") Set crxApplication = New CRAXDRT.Application Set report = crxApplication.OpenReport(strReport) CrystalReport1.ReportSource = strReport 'Trying to change path on the fly??? CRViewer91.ReportSource = strReport CRViewer91.ViewReport CRViewer91.Top = 0 CRViewer91.Left = 0 CRViewer91.Height = ScaleHeight CRViewer91.Width = ScaleWidth End sub


Reply With Quote