Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2020 : Report Design
Message Icon Topic: What is the Select Expert > Group Selection? Post Reply Post New Topic
Author Message
Cordellv
Newbie
Newbie
Avatar

Joined: 14 Jan 2009
Location: United States
Online Status: Offline
Posts: 35
Quote Cordellv Replybullet Topic: What is the Select Expert > Group Selection?
    Posted: 12 Mar 2009 at 2:24pm

If you chose the SELECT EXPERT and then click on Show Formula it takes you to the Select Expert window.  Above the formula are two radio buttons: Record Selection and Group Selection.  The default is Record Selection.  If you then click on the Formula Editor button that takes you to the normal Formula Workshop screen and displays the formula that was created by the Select Expert.  The menu options to the right show that you are in the Selection Formulas>Record Selection folder.  That is all fine and good.

 

In that same folder there is another folder called Selection Formulas>Group Selection.  That folder takes you to the same formulas that you get with the Radio Button Gruop Selection option on the Select Expert window mentioned above. 

 

By default the formula created by the Select Expert is displayed under the Record Selection option.  I now have a report that some way put a formula in the Group Selection window (and I can also see the same formula if I select the Group Selection radio button on the Select Expert window).  The formula is Sum({@Cur_Year_Course}, {Student_Class.Alphakey})>0

 

I have no idea how that formula ended up in the Group Selection folder and I cannot find any reference to the Select Expert> Group Selection radio button (or Formula Workshop Selection Formulas>Group Selection folder)  in the book except the name of it in a chart for Special Fields on page 84. 

 
Can you tell me what the Group Selection radio button on the Select Expert window is for and how it works or where I could go to read about it?  Thanks.   Cordell


Edited by Cordellv - 12 Mar 2009 at 5:58pm
Making Things Better One Day At A time
IP IP Logged
Cordellv
Newbie
Newbie
Avatar

Joined: 14 Jan 2009
Location: United States
Online Status: Offline
Posts: 35
Quote Cordellv Replybullet Posted: 14 Mar 2009 at 8:11am
Surely someone must know how to use: Select Expert > Group Selection Cry

Edited by Cordellv - 14 Mar 2009 at 8:12am
Making Things Better One Day At A time
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 16 Mar 2009 at 2:11pm
Hi Cordellv,
Your question intrigued me as I never use the group selection in the group expert (or so I thought).
I assumed it was just another AND statement you could insert group conditions on and keep track of them there but I just tested it and it did something a little different than I expected.
Usually you can run into selection problems on summary data because they "must be evaluated later" basedo nthe order that Crystal does itdata reads, formula reads and summarizing.
My simple test came up with to things. I was able to filter the data based on a DistinctCount at my group level when putting the condition in the group Selection but got the evaluate later error when placing the Distinct count in the Record Selection portion even though the syntax was the exact same.
Also very oddly All of my groups showed up in the group "tree" with no data under the groups that did not meet my group select condition rather than omitting them from the report completely (this test had a left join in it so that may have impacted the results).
 
Noted also when you have a field highlighted (actively selected in the report) and you click on the select expert button it will default to that field and give you options to filter on it.  Anice short cut i use for basic selection criteria. However this time I noticed if you select a group or report summary field and clcik on the Select Expert it will default to having the Group selection criteria highlighted. Hence I have done this filtering on some grouped criteria before but had not noticed this was going into the group selection portion of the select expert because that is hidden unless you move into the FOrmula portion.
Basically this appears to be a way to do selections based on Group summary criteria that normally would cause you problems based on evauation order of things. If you ever want to exclude a grouping of data based on a SUM or count or distinctcount etc. it must go into this part of the select expert. It appears to act as an AND with the Record Selection criteria if you are using both parts.
Hope this helps and thanks for asking the question!
IP IP Logged
Cordellv
Newbie
Newbie
Avatar

Joined: 14 Jan 2009
Location: United States
Online Status: Offline
Posts: 35
Quote Cordellv Replybullet Posted: 30 Mar 2009 at 3:12pm
Thank you for doing that testing with me.  I have not been able to find anything about this feature in any book or on the Internet.  I will go give it some more walk throughs with this new informaion you have given me and see if I can consistently start to use it and get results as expected.  Cordell
Making Things Better One Day At A time
IP IP Logged
Cordellv
Newbie
Newbie
Avatar

Joined: 14 Jan 2009
Location: United States
Online Status: Offline
Posts: 35
Quote Cordellv Replybullet Posted: 30 Mar 2009 at 4:27pm
I also got a reply today from a user on our own internal Crysstal Reports Forum.  Thougth I would share it with everyone.:
 

Group Selection formulas are used when you don't want to print all of the groups in a report, but still want all records displayed for the groups that are left. This usually means you are selecting only certain group names or using a sum or count (or any summary field). For example, you want to display all attendance history for specific students (Alphakey would be the group.  An example of selection by group name, but this would also work as a record selection) or all the attendance history for students who have missed more than 10 days (this would be a group selection by a summary field). In the Fiscal world, you could use a group selection to show all vendors that were paid more than $20,000. In HR you might use a group selection to show detailed days missed for employees who missed more than 5 days.

I think the formula listed is from the Voc report. In the Voc report, it originally showed the Voc history for all active students, but our Voc Director only wants to see students who took a Voc course during the current school year. We can use record selection to only show courses taken during the current school year by adding a formula to the record selection. Unfortunately, this will also prevent any historical Voc classes from being displayed.

If we add a sum that count how may voc courses a student has taken for the current year and add a formula to the group selection expert, we can only show the students who have taken at least 1 voc course this year while still displaying all of the voc history for these students.

The caveat to group selections in our environment is that they are evaluated client side. Record selections are usually done by the database server so they run faster. With group selection formulas, all of the groups are downloaded to your computer (or the metaframe server) before crystal decides which ones need to be displayed.

The short version of that-- If the report will work with a record selection formula instead of the group selection formula, it will run much quicker.

That probably didn't make any sense- but there is also an explanation on page 176 of the manual. https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/50c466a0-7c64-2b10-9697-bd3ac4a62bf6

Making Things Better One Day At A time
IP IP Logged
Post Reply Post New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum



This page was generated in 0.047 seconds.