Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
Public Sub FormatCrystalReport( _
Rep_Path As String, _
Rep_Name As String, _
Data_Path As String, _
Report_Title As String)
Dim rdApp As CRAXDRT.Application
Dim rpt As CRAXDRT.Report
Dim tbl As CRAXDRT.DatabaseTable
Dim SubReportObj As CRAXDRT.SubreportObject
Dim SubReport As CRAXDRT.Report
Dim Section As CRAXDRT.Section
Dim RObject As Object
Set rdApp = CreateObject("CrystalRuntime.Application")
Set rpt = rdApp.OpenReport(Rep_Path & Rep_Name)
' Reset the database paths in subReports
For Each Section In rpt.Sections
For Each RObject In Section.ReportObjects
If RObject.Kind = crSubreportObject Then
Set SubReportObj = RObject
Set SubReport = SubReportObj.OpenSubreport
For Each tbl In SubReport.Database.Tables
' Direct Access Database
tbl.Location = Data_Path & Mid$(tbl.Location, _
InStrRev(tbl.Location, "\") + 1)
Next tbl
End If
Next RObject
Next Section
Set SubReportObj = Nothing
Set SubReport = Nothing
' Reset the data paths for all the databases in the report.
For Each tbl In rpt.Database.Tables
tbl.Location = Data_Path & Mid$(tbl.Location, _
InStrRev(tbl.Location, "\") + 1)
Next
End Sub