Crystal Report subreport with Visual Basic 6.0

I have an external Crystal Report with a subreport inside and I need to send by parameter the string conecction to both of them, the main and the subreport. How can I do it. I have a way to send the string conecction to the main, but I cannot find how to do it to the subreport
[277 byte] By [RobetAltamirano] at [2007-12-28]
# 1

Rebet Altamirano,

The following code example will return a SubreportObject and hope that can help you:

Private Function GetSubreportObject _

(ByVal reportObjectName As String) As SubreportObject

Dim subreport As SubreportObject

If TypeOf _

(Report.ReportDefinition.ReportObjects. _

Item(reportObjectName)) Is SubreportObject Then

subreport = _

Report.ReportDefinition.ReportObjects. _

Item(reportObjectName)

GetSubreportObject = subreport

Else : GetSubreportObject = Nothing

End If

End Function

BrunoYu-MSFT at 2007-9-4 > top of Msdn Tech,Visual Basic,Visual Basic General...