|
-
Aug 12th, 2009, 11:17 PM
#1
Thread Starter
New Member
how to generate group report in DataReport by coding
Can anyone help me to generate group report in DataReport by writing code.
-
Aug 13th, 2009, 08:10 AM
#2
Re: how to generate group report in DataReport by coding
-
Aug 13th, 2009, 12:28 PM
#3
Re: how to generate group report in DataReport by coding
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
-
Aug 19th, 2009, 01:01 AM
#4
Thread Starter
New Member
Re: how to generate group report in DataReport by coding
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
-
Aug 19th, 2009, 12:52 PM
#5
Re: how to generate group report in DataReport by coding
Post your code.
"it is not working" means nothing to anyone except you. Explain the problems you are encountering.
-
Aug 20th, 2009, 04:54 AM
#6
Thread Starter
New Member
Re: how to generate group report in DataReport by coding
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
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
|