Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Upgrade code

Status
Not open for further replies.

Delphin

Programmer
Nov 27, 2001
134
US
I have a CR 8.5 Developer using the RDC and have this code. I just upgraded to 10.0 Developer and need to modify the code for upgrade. It gives me errors when I try to use this code after the upgrade. Not sure what I need to change to make it work.

Code:
Dim Report As New rptinvsum
Dim Subreport As CRAXDRT.Report
Dim SubObject As CRAXDRT.SubreportObject

Private Sub Connect()

 ' Pass the connection for the main report.
Report.Database.Tables(1).SetLogOnInfo "dsnduty", "", "", ""
' Pass the connection for the subreport.  Locate subreports in the report.
For X = 1 To Report.Sections.count
  For Y = 1 To Report.Sections(X).ReportObjects.count
    If Report.Sections(X).ReportObjects(Y).Kind = crSubreportObject Then
      Set SubObject = Report.Sections(X).ReportObjects(Y)
      Set Subreport = Report.OpenSubreport(SubObject.SubreportName)
      Subreport.Database.Tables(1).SetLogOnInfo "dsnduty", "", "", ""
    End If
  Next Y
Next X
 
 End Sub



Private Sub Form_Load()
 Set Report = Nothing
Connect
'invoice number
Report.ParameterFields(1).ClearCurrentValueAndRange
Report.ParameterFields(1).AddCurrentValue Pinv


CRViewer1.ReportSource = Report
CRViewer1.ViewReport

End Sub

Private Sub Form_Resize()
CRViewer1.Top = 0
CRViewer1.Left = 0
CRViewer1.Height = ScaleHeight
CRViewer1.Width = ScaleWidth
 
End Sub
 
What are the errors and on what line of code are they occuring?

zemp
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top