kohl: You could loop through the ReportObjects collection by item index number and return the name property e.g.
the following code is from the Developer Help under SubReportObject
Class SubreportObject
Dim crystalreport As CRPEAuto.Report
Dim sectsVar As CRPEAuto.Sections
Dim sectVar As CRPEAuto.Section
Dim objs As CRPEAuto.ReportObjects
Dim subObj As CRPEAuto.SubreportObject
Dim test As Integer
Dim crwApplication As CRPEAuto.Application
Private Sub Command1_Click()
'returns the subreport name
test = 1
Set crwApplication = CreateObject("Crystal.CRPE.Application"
Set crystalreport = crwApplication.OpenReport _
("c:\crw\reports\xtreme\wwsales.rpt"
Set sectsVar = crystalreport.Sections
Set sectVar = sectsVar.Item("RF"
Set objs = sectVar.ReportObjects
sortFlds.Add crDescending, "{Customer.Region}"
Set subObj = objs.Item(1)
MsgBox "Name of subreport(autonum.rpt): " & subObj.Name
End Sub David C. Monks
david.monks@chase-international.com
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.