Results 1 to 6 of 6

Thread: how to generate group report in DataReport by coding

  1. #1

    Thread Starter
    New Member
    Join Date
    Aug 2009
    Location
    Imphal
    Posts
    5

    Smile how to generate group report in DataReport by coding

    Can anyone help me to generate group report in DataReport by writing code.

  2. #2
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    Re: how to generate group report in DataReport by coding

    Moved To Reporting

  3. #3
    PowerPoster
    Join Date
    Sep 2005
    Location
    Modesto, Ca.
    Posts
    5,515

    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

  4. #4

    Thread Starter
    New Member
    Join Date
    Aug 2009
    Location
    Imphal
    Posts
    5

    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

  5. #5
    PowerPoster
    Join Date
    Oct 2002
    Location
    British Columbia
    Posts
    9,758

    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.

  6. #6

    Thread Starter
    New Member
    Join Date
    Aug 2009
    Location
    Imphal
    Posts
    5

    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
  •  



Click Here to Expand Forum to Full Width