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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

DataReport w/o DataEnvironment - Grouping problem

Status
Not open for further replies.

DeltaMira

Technical User
May 3, 2004
13
0
0
BG
all day I couldnt find a thing that helps this terrible grouping problem. Jocasio mentioned something about the SHAPE statement which actually gives a hope ... but I am not sure how to use it nor that it's extly that thing. Here is what the problem is exatly:

when I add the grouping level to the report it starts telling me that report does not match the datasouse. I hate the data environment, otherwise I know there is a way there. But I want to do the whole thing in code and here is what I have as code

Private Sub DataReportFill(DataReport As DataReport, cmdtext As String)

Dim Cnn As New ADODB.Connection
Dim mrst As New ADODB.Recordset
Dim Cmd As New ADODB.Command

With Cnn
.ConnectionString = "Provider=SQLOLEDB.1; " & _
"Integrated Security=SSPI; " & _
"Persist Security Info=False; " & _
"Initial Catalog=" & Databasename & "; " & _
"Data Source=" & Databaseserver & ""
.CursorLocation = adUseClient
.Open
End With

With Cmd
.ActiveConnection = Cnn
.CommandType = adCmdText
.CommandText = "select A, B, C, D from SomeTable where A = '" & UserDefinedA & "'"
End With

Set mrst = Cmd.Execute
With DataReport
Set .DataSource = mrst
End With

End Sub


what I need to display here is show the details B, C, D in Section2 of the report and in Section6 - The grouping section to have A.

Anyone, ideas?....
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top