data report grouping 
Author Message
 data report grouping

Hi!

I have a quite confusing problem. I want to make a report which should
look like this:

LEVEL: 01
Code    Number of locals        Total areas
A1      12                      56
B1      5                       12
C1      8                       25

LEVEL: 05
Code    Number of Locals        Total Areas
A2      10                      60
D2      3                       15

LEVEL: 06
etc, etc

I've made a grouped command in the data environment:
-SQL cmd_verd grouped using cmd_verd_Grouping
  -Summary fields in cmd_verd_Grouping
     level
     Code
     number (this is an aggregate 'sum')
     total  (this is an aggregate 'count')
  -Detail fields in cmd_verd
  etc

Finally, this is a part of my code:

strSQL="select (local_id) as number, code, (areas) as total, level from
table"

deGlobal.Commands("cmd_verd_grouping").CommandText = strSQL
On Error Resume Next
deGlobal.rscmd_verd_Grouping.Open
deGlobal.rscmd_verd_Grouping.Requery
datareport1.show
deGlobal.rscmd_verd_Grouping.close

I've done retrieve structure in the datareport, put the Level in the
group header part and
put the code, number and total in the detail section.

The problem is that everytime I run my program, there is an error
message:
"Report sections do not match data source"

I'll be very grateful for any help.
Elisabeth

Sent via Deja.com http://www.*-*-*.com/
Before you buy.



Sat, 24 May 2003 03:00:00 GMT  
 data report grouping


Fri, 19 Jun 1992 00:00:00 GMT  
 data report grouping
Just a little correction in my SQL statement:

strSQL="select count(local_id) as number, code, sum(areas) as total,
level from table"


Quote:

> Hi!

> I have a quite confusing problem. I want to make a report which should
> look like this:

> LEVEL: 01
> Code       Number of locals        Total areas
> A1 12                      56
> B1 5                       12
> C1 8                       25

> LEVEL: 05
> Code       Number of Locals        Total Areas
> A2 10                      60
> D2 3                       15

> LEVEL: 06
> etc, etc

> I've made a grouped command in the data environment:
> -SQL cmd_verd grouped using cmd_verd_Grouping
>   -Summary fields in cmd_verd_Grouping
>      level
>      Code
>      number (this is an aggregate 'sum')
>      total  (this is an aggregate 'count')
>   -Detail fields in cmd_verd
>   etc

> Finally, this is a part of my code:

> strSQL="select (local_id) as number, code, (areas) as total, level
from
> table"

> deGlobal.Commands("cmd_verd_grouping").CommandText = strSQL
> On Error Resume Next
> deGlobal.rscmd_verd_Grouping.Open
> deGlobal.rscmd_verd_Grouping.Requery
> datareport1.show
> deGlobal.rscmd_verd_Grouping.close

> I've done retrieve structure in the datareport, put the Level in the
> group header part and
> put the code, number and total in the detail section.

> The problem is that everytime I run my program, there is an error
> message:
> "Report sections do not match data source"

> I'll be very grateful for any help.
> Elisabeth

> Sent via Deja.com http://www.deja.com/
> Before you buy.

Sent via Deja.com http://www.deja.com/
Before you buy.


Sat, 24 May 2003 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Data reports grouping

2. How to create Data Report groups without using hierarchical recordsets

3. Data reports grouping

4. Data Report Group Header in VB6.0

5. Data reports grouping

6. Data Report grouping problems

7. Using the Shape command to multiple grouping of data for data reports

8. Using the Shape command to multiple grouping of data for data reports

9. Data environment + Grouping a view + Data Report = crash !

10. Stopping data from being grouped by Group 1 when that group is suppressed

11. Urgent! Data grouping of report

12. create an unbound data report with group headers

 

 
Powered by phpBB® Forum Software