|
-
Dec 5th, 2005, 02:53 AM
#1
Thread Starter
New Member
group header vb report with out data environment
I have a table
table1
dept-hod-emp-collection
sales-xx-raj-2000
sales-xx-ajit-3000
purchase-xx-mohan-5000
warehouse-yy-rohit-6000
sales-zz-anuj-2000
i want to 2 group header data report like-
dept=sales (groupheader1 section)
hod=xx (groupheader2 section)
raj-2000 (detail section)
ajit-3000
hod=zz
anuj-2000
dept=purchse
hod=xx
mohan-5000
....and so on
i have completed the one group by report by following statement
Private Sub Form_Load()
Command1.Caption = "Show Report"
cn.Open "Provider=MSDATASHAPE; Data Provider=Microsoft.JET.OLEDB.4.0;" & _
"Data Source=" & App.Path & "\db1.mdb;"
With cmd
.ActiveConnection = cn
.CommandType = adCmdText
.CommandText = " SHAPE {SELECT * FROM table1} AS Command1 COMPUTE Command1 BY dept"
.Execute
End With
With rs
.ActiveConnection = cn
.CursorLocation = adUseClient
.Open cmd
End With
Set rs1 = rs(0).Value
End Sub
Private Sub Command2_Click()
Set DataReport1.DataSource = rs
DataReport1.Show
End Sub
what are the shape statement to use 2 group header report.
please describe step-by-step becouse I am a beginer
thanks
daya
Last edited by dayanand108; Dec 5th, 2005 at 02:56 AM.
Reason: missing some lines
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|