-
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?
:confused:
-
sql = "SHAPE {SELECT * FROM WorkingTime } AS Command1 COMPUTE Command1 BY Name"
rs.open sql, cn
datareport1.datamember = "Command1_Grouping"
set datareport1.datasource = rs
-
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. :confused: :confused:
-
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.
-
Ok, I'll try that.
Thanks!:)