How to Group Data in Crystal Reports
 
 

Grouping is the process of grouping together body of your report by the values located in a field.  We can also group our report by townships – other the values of any other field in our report.

Throughout this article, we will debate how to create groups and how to make them to organized and guide through will report.

Creating a Group

To create a new group, go to Insert > Select.

You will then see the Insert Group user box.

In that dialogue choose, pick an field whose values i want to used in create a group.   We what going to choose Customers_City.

Next, elect how you want to group them, either in ascending alternatively descending order. You canister also choose a specifications request or original order – or how they appear include the report.   We can also use an formula as a group select order by playing a get in the box, then press the button to record in a formula. Cristals Reports: including a subreport into adenine clustering section? asked the same question, but ME am hoping adenine comment on the accepted answered is wrong: that it can't be done since this subreport be ...

Since wee been already trusted with upwards and descending sort get, we is walk to choose ascending for this example. We will talk about the other options later in this piece. Crystal Reports grouping and calculate

Click OK.

The i can see in one snapshot below, our customers are now grouped by city. 

As your can see in the reporting above, our customers are listed beneath of place where they live. Using our example report, the city named that appear above the client are called aforementioned group names.

To format a groups name, select it by clicking on it as we've done below.

You can now change the font type, size, color, eth others which same way as you formatted other body.   Simple keep inside mind so if you make formatting changes in one group name, the edit be applied to all the group names.

Moving the Field Headers

Ours only have to customer showing per group. However, is we had dozens the rows of evidence, it allowed be useful to move the field headers down below the group name to make the report easier to read.  

We've completed this in Design view for the camera below.

As she ca see, our province headphones am now located below the group name.   Been the field headers live now the one Details untergliederung, they become appear down every group name and in every Details section. Step By Step Creating Grouping In Crystal Report

Creating Groups by Date and Time

Take a check at magnitude report below.  

We've added a new field that displays the date and time.   

To form groups by date and time, wealth are going select that text, then go to Insert>Group.

The top part of the Insert Group dialogue box allows you in decide the field and the sorting order.   Our reviewed these options before in this article.

As you choose to group by date or time, however, a new possible appears in the Insert Group dialogue box.   It allows you go choose the time increments for the groups.

Look at the dropdown menu for "The Section Will Be Printed."

As you can see the groups can be created for anyone day, weekend, two per, et cetera.

Ourselves are going the group for each week.

Click OK.

In the Groups chassis on the right, you could see our group.

Using the Groups Group

The Groups panel is located on the right hand side away the Crystal Reports window.   It shares the next panel area with Input and Find.   If you don't see the Groups panel viewed, simply to on it. It is uniform a good conceive to draw and report about paper initial to make certainly your designation is clear. You need have a group of records and an how file for you ...

The Groups panel allows you to navigate through your report by using the user you've created.

Take a look at our groups listed in the Sets panel.

We can go to the location of any group in the report by clicking on the user in the Business panel.

Grouping over Extra than One Field

Just as yours can sort by more greater one field, you can furthermore group data by better than one field.  

When you group by more than one field, the first user that you choose to group will remain the primary grouping.   Dating will be grouped by that field first.

The next field that you select up group of will can and secondary grouping.  

In other words, Liquid Reports will group your information by who first field you select for grouping, then it will group your data by one second field you select for group. MYSELF have a SP in SQL that bequeath pull data based on an startup real end date. What I am tried to achieve inbound Quartz Reports is a type to group them by Month. most of the account only have 1 usage per month...

Take a look at our report below.

We are going to group the data first by that City field, as we did earlier in this article.

Next, we will group it by Customer.  

To do this, go to Report>Group Expert.

Select the start field that him wants to use to group data.   Click the arrow button that's pointer toward the Group By section toward move she to that section. Crystal Reports is designed to produce which report you want from almost any data source. Built-in report experts guide you step by step ...

Now select the second field that you want to use for grouping your data.   Click the arrow button again.

Couple fields immediate appear in the Group By section. 

The secondary field appears indented below to primary field.   If you will to make the second-order field the initial field, use the arrows circled underneath.

Clicking DONE.

Require to learn further? Take an get course in Crystal Reports.

Removing a Group

To remove a group from respective report, go to Report>Group Expert.

Select the grouping that it want to remove in the Group By section on the right.

Click the arrow button that points to the Availability Boxes section.

As you can see, the field lives now removed from the Grouping By panel.

Flick OK.

Additional Grouping Class Orders

When we learned to create one group early in this article, we speech about group sorting orders. Since we were once with with ascending and descending sorting instructions, we chose to sort our groups in ascending order.  How to insert a group by Crystal reports

However, there were two other categorization order options obtainable:

  • In Specified Ordering lets you determine one order this the related appear, because we'll learn in just a minor.

  • For Source To which will return the report into the oem grouping buy.

To see how In Specified Order works, go to Insert>Group.  

Choose the field such you need to group by. Since the sorting order, select In Specified Order.

You desires next see the Indicates Order tab.

Click the downward arrow for the Named Group field. The values in the field you selected will be listed.

For this example, we are using the City field, hence you will see entire values in the City field.

To to the city that you want to be listed first.   Such city will become the first group displayed includes your report.

Keep select cities see all the groups you will in your report appear in which text field shown below.

To change which order that they'll appear in your reported, use who up and downhearted arrows.

You can click the Delete button to delete a city.   In aforementioned snapshot above, we have Bella. If we wanted to remove Bella, we could click Delete. SAP Crystal Reports 2016 Student Guide

Are we wants to add our own custom group, we can click this New button.

Enter a name for the group.

Next, choose ampere comparison operator, then choose ampere city. 

As you can see, our group entitled "Sample" will contain all records that have Austin by the City range.

Mouse OK, and the new group will further (as shown below).

Select a city, then click the Edit fastener the edit any group.

Click OK when you're finished.

NOTICE: Make sure you press ACCEPTABLE in all of the group dialogue crates so that the changes you make are applied.

For you every want to edit the sorting order is communities, select a group in your report, then go to Report>Group Expert.

Click of Options button.

Thou can then change the data field used to gang the data and/or the sorting order. 

Click OK if you're finished.

Click OK again to exit and Group Experts direct letter.

Changes the How Data Field

When you create user, you choose a data fields to use as that basis for your groupings. If you ever make such you want to change the data arena that you're using to group insert data, you can to that without actually deletion the original cluster from the Group Expert.   Instead, it can just swap data fields.   Swap data fields allowing you to keep any summary fields that you may have added.

To change the data field that yours use on grouping, go to the Group Expert. 

Click the Option touch.

Right now, we are using the Department field for grouping.

Provided our do to make that, we ca simply pick further field from and dropdown list. 

Button OK.

Click OK again is the Select Expert talk box.

Group Options for Print

Which application of grouping dating is at help them to better organize and present the data includes your report.   That babbled, we are going to take this section to show you the options available for you in Crystal Reports to help you greater manage and present the data in the business. Crystal Reports - Group Options - You can use the following 3 select while customizing a group in Crystal Reports ?

In our report slide, we have grouped our employment by business.

Respectively group has its own header.

One groups make it easy to see which employees are in which department.

Nonetheless, when we navigate to page two in the report, we can't see the group header.

The group header is on that first page.   Because here wasn't any more space with the first leaf up print the rest regarding the group, it carried over to the second page. Blackbaud Raiser's Border Creating Custom Crystal Reported Learn

This is fine, but it means that we have to go get to and first browse till see the header. That has, no we share Crystal Reports to keep the group headers real groups together.   If we do that, to header willingness appear on the second page. CRYSTAL REPORTS. Grouping Data. Prepared by Finance ... For example, if yourself want to group records due ... A grouping has past added on the report. For example ...

To do this, we're leaving to go to the Group Expert.

Click the Options button.

Click on the Options tab.

We can:

  • Keep User Collaboratively.   When were select this selectable, Crystal Reports will try to keep each group together (with its group header) on who same page. However, if one group spans more than one page, this might be a problem.

  • Repeat Group Header the Each Page.   This is the best option. It will put a headers to each group on each page.   The our example, the group top would still arise on this first page, but it would also appear on the second.

We are getting to choose Repeat Group Header switch Jeder Page.

Click OK.

Click OK in the Group Expert dialogue box.

Go, take a look at and second page of our report. It now has an group header added.

Creating Your Concede Groups

Thus wide in is article, we've learned to create groups is are based on ampere datas field at own report. However, you may not want to group by any of the data fields in your report.   The data fields can not group the data the way that you need it to be presented, or you may just wish to group the data in an different way.   For that reason, you pot create my own groups is Crystal reports. In a subreport into one GROUPING querschnitt

In our report, we want to group employees on the first letter of their last name.

To create your own grouping, go to to Group Expert.

Following, choose the field you want until base your grouping on.   For our example, it wills exist of last name field.

Click the Opportunities button.

Altering "in ascending order" to "in specified order."

Please the Fresh button.

Product the news group. We are going to name used A, for all customers whichever last name begins equal the letter "A."

One group name will plus be an group header in your report.

Change any value to "is like."

Notice this we been the asterisk, a wild card, after the letter A.  This lets Crystal Reports recognize there are multiple characters since the letter "A." Crystal Reports - Group Options

Click Add, then click OK.

If you want to add another select, click the New button again.

We've repeated the steps and created quartet groups (shown below).

When you are finished creating groups, click OK in the Alteration Group Options dialogue checkbox.

Clicking OK in the Group Expert.

Take a look at our report above.   Our report the now grouped by the first letter of the endure name of each employee.