:) Can anyone help me to generate group report in DataReport by writing code.
Printable View
:) Can anyone help me to generate group report in DataReport by writing code.
Moved To Reporting
If you don't want to use a DataEnvironment then you need to use a MSDataShape recordsource, this is one I use.
Code:' Open a DATA Shape Connection For Reports
With conReport
.Mode = adModeShareDenyNone
.Provider = "MSDataShape" 'Microsoft Provider for Data Shaping
.ConnectionString = "Data Provider = Microsoft.Jet.OLEDB.4.0;" & _
"Data Source = " & conDb
.Open
End With
' open ADODB recordset for report
cSql$ = "SHAPE {SELECT * FROM `tagsjournal`} AS tagsjournal APPEND ({select * from tjdetail order by tagnumber,date} AS Command1 RELATE 'userid' TO 'userid') AS Command1"
If (conReport.State And adStateOpen) > 0 Then
With rsData
.ActiveConnection = conReport
.LockType = adLockReadOnly
.CursorType = adOpenStatic
.Open cSql
End With
End If
Set rptTagsjournal.DataSource = rsData
rptTagsjournal.Show
Set rsData = Nothing
Thanks for your help. I have tried that one 8 days ago. I use SQL server 2000 and work fine for a single table. but for multiple table , it is not working.
Gojendra
Post your code.
"it is not working" means nothing to anyone except you. Explain the problems you are encountering.
I remove alias name of table from field name and it work fine. How can I include group footer with number of row count and total row count at the report footer.
gdkons