Re: grouping in datareport
Take a DataReport, Right click on it then Insert Group Header Footer
Put a TextBox on the Group Section and Set it's property "DataField" to NAME
in the detail section the other data, then use code like this and you will have a Grouped by Name Datareport
Private Sub DataReport_Initialize()
Dim strSQL As String
Dim strTo As String
Dim strFrom As String
Dim oConn As New ADODB.Connection
Dim oRS As New ADODB.Recordset
oConn.CursorLocation = adUseClient
oConn.ConnectionString = DataEnvironment1.Connection1
oConn.Open
strSQL = "SHAPE { SELECT NAME FROM TABLE1 } AS Command1 APPEND " & _
"({ SELECT SOMETHING FROM TABLE2} AS Command2 RELATE 'ID' TO 'ID1') AS Command2 "
oRS.Open strSQL, oConn, adOpenForwardOnly
Set drSAP.DataSource = oRS
End Sub
Re: grouping in datareport