Easy to Create, Easy to Change - Easy to use!

Support::

Grouping



Parameters


Returns/Result


Examples


Reference

Grouping

Type

Concept

Purpose

Grouping lets you process records with the same field value together.

Usage

There are two DQL operators that control grouping: in groups and in groups with group-totals. They perform identically; ?in groups with group-totals? is included for compatibility with previous versions of DataEase.

The in groups operator causes records with identical values in a specified field to be processed as a single group. The groups are automatically sorted in ascending order. For example, French Polynesian clubs are listed together as a group followed by the Haitian clubs, and so on.

Example 1

for CLUBS ;

list records

COUNTRY in groups ;

CLUB NAME in order ;

CITY .

end

 

The output generated by the script in Example 1 is grouped on the COUNTRY field (shown in bold):

 

 

Country

Club Name

City

French Polynesia

Bora Bora

Papeete

 

Moorea

Moorea

 

 

 

Haiti

Magic Isle

La Pointe aux Sables

 

 

 

Mexico

Cancun

Yucatan

 

Chichen Itza

Chichen Itza

 

Cholula

Cholula

 

Coba

Coba

 

Huatulco

Oaxaca

 

Ixtapa

Guerrero

 

Playa Blanca

Jalisco

 

Sonora Bay

Sonora

 

Teotihuacan

Villa de Teotihuacan

 

Uxmal

Uxmal

 

Example 2

The in groups operator groups records and generates statistical totals for each group if any other statistic is requested by the script.

 

for CLUBS ;

list records

COUNTRY in groups ;

CLUB NAME in order ;

CITY ;

"A" = "A" : count .

end

 

In this example, the count statistic allows DataEase to calculate the group total for each country. The line:

  "A" = "A" : count .

..tells DataEase to count every record that is processed.

 

The output includes the group level statistics (shown in bold):

 

 

Country

Club Name

City

 

French Polynesia

Bora Bora

Papeete

 

 

Moorea

Moorea

 

 

 

 

 

Group Total 2

 

 

 

Haiti

Magic Isle

La Pointe aux Sables

 

Group Total 1

 

 

 

Mexico

Cancun

Yucatan

 

 

Chichen Itza

Chichen Itza

 

 

Cholula

Cholula

 

 

Coba

Coba

 

 

Huatulco

Oaxaca

 

 

Ixtapa

Guerrero

 

 

Playa Blanca

Jalisco

 

 

Sonora Bay

Sonora

 

 

Teotihuacan

Villa de Teotihuacan

 

 

Uxmal

Uxmal

 

Group Total 10

 

 

 

...

...

...

 

Total CLUBS: 25

 

 

 

 

There are two key points to remember when using Grouping:

Grouping automatically sorts groups in ascending alphabetical or numerical order (e.g., French Polynesian clubs before the Haitian clubs ).

Grouping operators must precede Sorting operators (in order and in reverse) in a script.

See Also


On the forum about Grouping

Grouping and Header

One of the time consuming issue I always come up with during the conversion from DFD to DFW.Displaying a field value from group on header. Either we have to put the field in items and use summary variables.Or with the new D8 technique, usin...

Product: Dataease [{8}]FIVE. Written by Jeyarajah Arulrajah 22/06/15 at 18:15:54

Re:Grouping and Header

Some times I think you do this just to wind me up Arul ;-)QBM and DQL Reports as introduced in DFW 5.x has never worked. QBM was an over idealised idea back in the early 90ies and the "crazy" idea that "someone" in Sapphire had of using it as...

Product: Dataease [{8}]FIVE. Written by DataEase 22/06/15 at 18:53:38

Re:Re:Grouping and Header

I completely agree with you on what you were saying.BUT, DataEase is now your baby. So, it does not make any sense to blame previous owners...etc.We need to at the minimum find a workaround to use D8.Anyways, I am attaching a databas...

Product: Dataease [{8}]FIVE. Written by Jeyarajah Arulrajah 22/06/15 at 21:53:07

Re:Re:Re:Grouping and Header

Explaining not blaming Arul ;-)I don't think I say anything that not everyone having used DataEase for WIndows have thought and wondered about.QBM and DQL is left in DE8 for backwards compatibility. You are hitting the nail...

Product: Dataease [{8}]FIVE. Written by DataEase 23/06/15 at 07:59:33

ExecDQL simple Report with grouping.

Download Sample! Just for fun we made the same report with the New Exec...

Product: Dataease [{8}]FIVE. Written by DataEase 23/06/15 at 09:25:04

Re:ExecDQL simple Report with grouping.

I have used summary feature in the header since the DFW introduction. But, even that does not work when you have a second page.Even second page. Then I have to place the field into .ITEMS area. Even that fails when 3rd page does not have the...

Product: Dataease [{8}]FIVE. Written by Jeyarajah Arulrajah 23/06/15 at 12:52:17

Re:Re:ExecDQL simple Report with grouping.

Yes, I agree that we should use the new features in DE8. This is ok for the new and future clients.But, question comes, do I need to upgrade/update my clients each time when there is a new feature in DE8??Even though it is a free update for...

Product: Dataease [{8}]FIVE. Written by Jeyarajah Arulrajah 23/06/15 at 13:27:46

Re:Re:Re:ExecDQL simple Report with grouping.

BTW: client using 8.2. And this new feature formatted body is 8.5 right?...

Product: Dataease [{8}]FIVE. Written by Jeyarajah Arulrajah 23/06/15 at 13:34:58

Re:Re:Re:ExecDQL simple Report with grouping.

You obviously don't have to update a client if you don't use any of the new functionality. You can keep them in any version you like as long as they and you are happy, but equally obviously you can't use a new feature without updating the software.<br...

Product: Dataease [{8}]FIVE. Written by DataEase 23/06/15 at 13:49:48

Re:Re:Re:Re:ExecDQL simple Report with grouping.

Yes, this is the latest feature in DE8 and is as such only available in the latest 8.5.8.2 Development was concluded last year (2014)....

Product: Dataease [{8}]FIVE. Written by DataEase 23/06/15 at 13:55:56

Re:Re:Re:Re:Re:ExecDQL simple Report with grouping.

Problem I always face. Client running 8.2 without any issues for a while. Wants some enhancements done. Either I have to update them to 8.5 and use the new features. Which means, I have to provide gurantee it will not break anything else. Or find a wo...

Product: Dataease [{8}]FIVE. Written by Jeyarajah Arulrajah 23/06/15 at 14:00:31

Re:Re:ExecDQL simple Report with grouping.

There is a lot of "awkward" &nbsp;behaviour but. 1. It works if you print it rather than use Print to Screen. 2. It works when Print to screen if you use arrow down rather than PageDown. 3. The problem with the extra text is that it b...

Product: Dataease [{8}]FIVE. Written by DataEase 23/06/15 at 15:36:39

Re:Re:Re:ExecDQL simple Report with grouping.

Actually, I do have a workaround which works every single&nbsp;time. I was giving this problem, and hoping you will show me something to make DataEase....EASY..... rather than HARD.Only workaround works every single time is to use Holding table...

Product: Dataease [{8}]FIVE. Written by Jeyarajah Arulrajah 23/06/15 at 17:37:40

Re:Re:Re:Re:ExecDQL simple Report with grouping.

I rest my case ;-)&nbsp;I am building you a new DQL, what more can I do? I think my view on the existing DQL implementation has been clear since the start. I think I have been clear from the start that NEW is our focus, not mending old...

Product: Dataease [{8}]FIVE. Written by DataEase 23/06/15 at 18:17:56

How to change decimal symbol and grouping (thousand separator) in DataEase 8

We can't see anything wrong, but if you are thinking of the decimal symbol and the digit grouping symbol (thousands separator) then this s governed by your windows settings.You find them und...

Product: Dataease [{8}]FIVE. Written by DataEase 26/08/15 at 09:28:17

Re:How to change decimal symbol and grouping (thousand separator) in DataEase 8

It looks like a rounding problem. The system has not added the 0.01 to the running total....

Product: Dataease [{8}]FIVE. Written by Kensington 26/08/15 at 09:52:12

Re:Re:How to change decimal symbol and grouping (thousand separator) in DataEase 8

The "problem" here is that in calculations DataEase always work with FLOAT so individually both of these two numbers is rounded up but when added the rounding up of the sum is the same as the previous one.If you want to avoid this convert the...

Product: Dataease [{8}]FIVE. Written by DataEase 26/08/15 at 11:00:23

Penny for your Thoughts ! Re:Re:Re:How to change decimal symbol and grouping (thousand separator) in DataEase 8

This site had a series of tools for rounding, but it was for DE 5.5http://www.computerwizardonline.com/wizutils1.htmThere is also a discussion in the Ffenics Technical forum...

Product: Dataease [{8}]FIVE. Written by Kensington 27/08/15 at 09:23:32

On the blog about Grouping