Results 1 to 5 of 5

Thread: DataReport and Grouping

  1. #1

    Thread Starter
    Member
    Join Date
    May 2000
    Location
    Sweden
    Posts
    50

    Question DataReport and Grouping

    In my database I have a table called WorkingTime with 6 fields. Name, Date, In, Out, Late, Info.

    I would like to group my report by Name:

    Name1
    ---------------------------------------------------
    Date1 In Out Late Info
    Date2 In Out Late Info
    Date3 In Out Late Info
    Date4 In Out Late Info

    ---------------------------------------------------

    Name2
    ---------------------------------------------------
    Date1 In Out Late Info
    Date2 In Out Late Info
    Date3 In Out Late Info
    Date4 In Out Late Info

    and so on....

    How would I do this, using Shape?
    Wolf

    VB6 SP5

  2. #2
    Fanatic Member
    Join Date
    Aug 2001
    Location
    Connecticut
    Posts
    855
    sql = "SHAPE {SELECT * FROM WorkingTime } AS Command1 COMPUTE Command1 BY Name"
    rs.open sql, cn
    datareport1.datamember = "Command1_Grouping"
    set datareport1.datasource = rs
    Last edited by ralph; Feb 19th, 2003 at 04:53 PM.
    VB 6.0, Access, Sql server, Asp

  3. #3

    Thread Starter
    Member
    Join Date
    May 2000
    Location
    Sweden
    Posts
    50
    Sorry. Didn't work.
    Gives me an error.
    Number: 3001.
    Description:
    The application is using arguments that are of the wrong type, are out of acceptable range, or are in conflict with one another.
    Wolf

    VB6 SP5

  4. #4
    Fanatic Member
    Join Date
    Aug 2001
    Location
    Connecticut
    Posts
    855
    Do yourself a favor. Even if you're not using the dataenvironment, use it to set the report up and working. Then copy the info/properties/connectionstring/shape statement/etc that it generates. Then discard the dataenvironment.
    VB 6.0, Access, Sql server, Asp

  5. #5

    Thread Starter
    Member
    Join Date
    May 2000
    Location
    Sweden
    Posts
    50
    Ok, I'll try that.
    Thanks!
    Wolf

    VB6 SP5

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