Click to See Complete Forum and Search --> : Grouping on a data report


Dr_Michael
December 1st, 1999, 06:40 AM
How can I group data on a data report ? I use only one table (command). I mean there is not a parent and a child command. I have only one command and I want to group the results on the report by date or anything. Is it possible?
I use VB6 SP3, data environment and data report.

P.S. I think these tools have a lot of improvement to be done. I hope to become the soonest possible more powerful tools... At the moment are not!

Michael Vlastos
Automation Engineer
Company Modus SA
Development Department
Athens, Greece

Lothar Haensler
December 1st, 1999, 07:41 AM
I agree, DataReport sucks.
Can't you do the grouping via SQL? SELECT... FROM GROUP BY ...?

Dr_Michael
December 2nd, 1999, 02:10 AM
The tool doesn't support drag and drop fields from the data environment in different sections on the report. All fields must be on the detail section, except you have a parent-child relationship. But, do you want to learn something very strange? This is the story:
Database is SQL-Server. Connection has been made through data environment and all looks fine. I have created a parent-child command (2 tables related) and I can easily see on the environment the ierrarchy and all the fields from both tables. I drag and drop the fiels on the data report following exactly the instructions from MSDN. I run the program and it fires, saying that data fields not found. After 2 weeks of trying, I found that a parent-child relationship cannot exist on data environment if in the database there is not the same relationship! But then, why I am inforced to make the relationship on data environment? It seems to make the relation in different levels or something. I think it is stupid. The best is this: If the relationship must be inside the database then don't ask for relationship inside data environment of VB. Or, if you ask for it, then it must not be necessary to have the same relatonship inside the database. Am I wrong?


Michael Vlastos
Automation Engineer
Company Modus SA
Development Department
Athens, Greece