Crystal Developer 8.5
Visual Basic 6.0
I am using the RDC (CRAXDRT.DLL) with VB to pull reports from a server location. I want to offload the work (and licensing)to the server location. Do I need to use ASP, or can I utilize the SetLogonInfo to access the server? (Right now I am getting "Server has not yet been opened." What's the best way to do this. I would like to steer away from ASP. Is an ODBC connection needed for each client PC? Below is the code I have been using.
Thanks in advance for your assistance.
Matt
'General Declarations
Dim RptLocation As String
Dim RptParams As CRAXDRT.ParameterFieldDefinition
Dim CrxApp As New CRAXDRT.Application 'Application Object
Dim CrxRpt As CRAXDRT.Report 'Report Object
Private Sub Form_Load()
'Use the OpenReport method of the Application object to open the report.
RptLocation = "\\Osc5023\RptShare\RouteInventory.rpt"
Set CrxRpt = CrxApp.OpenReport(RptLocation)
CRViewer1.ReportSource = CrxRpt
'Define parameter fields
CrxRpt.ParameterFields(1).AddCurrentValue "MAH"
CrxRpt.ParameterFields(1).AddCurrentValue "DKF"
'Set the report view
With CRViewer1
.Top = 0
.Left = 0
.Width = Me.ScaleWidth
.Height = Me.ScaleHeight
.DisplayGroupTree = False
.ViewReport
End With
End Sub
Visual Basic 6.0
I am using the RDC (CRAXDRT.DLL) with VB to pull reports from a server location. I want to offload the work (and licensing)to the server location. Do I need to use ASP, or can I utilize the SetLogonInfo to access the server? (Right now I am getting "Server has not yet been opened." What's the best way to do this. I would like to steer away from ASP. Is an ODBC connection needed for each client PC? Below is the code I have been using.
Thanks in advance for your assistance.
Matt
'General Declarations
Dim RptLocation As String
Dim RptParams As CRAXDRT.ParameterFieldDefinition
Dim CrxApp As New CRAXDRT.Application 'Application Object
Dim CrxRpt As CRAXDRT.Report 'Report Object
Private Sub Form_Load()
'Use the OpenReport method of the Application object to open the report.
RptLocation = "\\Osc5023\RptShare\RouteInventory.rpt"
Set CrxRpt = CrxApp.OpenReport(RptLocation)
CRViewer1.ReportSource = CrxRpt
'Define parameter fields
CrxRpt.ParameterFields(1).AddCurrentValue "MAH"
CrxRpt.ParameterFields(1).AddCurrentValue "DKF"
'Set the report view
With CRViewer1
.Top = 0
.Left = 0
.Width = Me.ScaleWidth
.Height = Me.ScaleHeight
.DisplayGroupTree = False
.ViewReport
End With
End Sub