Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Group selection vs record selection 1

Status
Not open for further replies.

Newbi1

Programmer
Apr 4, 2005
64
US
Forgive me all still learning this.
CR 9 SQL Server 2000/Baan win XP

I have tried this several ways, but I see advantages and disadvantages to group selection. Maybe someone can help me figure out what I wam doing wrong.

If I do a record selection it slows my report to over 3 min, however if I do a group selection my report is now about 30 seconds.

I have an issue though.. In the group tree the records which were omitted from the report still show there. How do I suppress them from the group tree if they are already ecluded from the report by a group record selection?

Here are the statements I am using:
Record:
{tfacr200.ttyp} = "SO1" and
{tfacr200.balc} > 0.00
and DateDiff ("d",{tfacr200.dued} ,CurrentDate )>= 10

Group:
{tccom010.crra} in {?CredAnalStart} to {?CredAnalEnd} and
{tccom010.cfcg} in {?CustGroupStart} to {?CustGroupEnd} and
{tccom010.cuno} in {?CustNoStart} to {?CustNoEnd}

I have tried to combine all this, but the report takes forever such as:

{tccom010.crra} in {?CredAnalStart} to {?CredAnalEnd} and
{tccom010.cfcg} in {?CustGroupStart} to {?CustGroupEnd} and
{tccom010.cuno} in {?CustNoStart} to {?CustNoEnd}and
{tfacr200.ttyp} = "SO1" and
{tfacr200.balc} > 0.00
and DateDiff ("d",{tfacr200.dued} ,CurrentDate )>= 10

Any help would be appreciated

 
Group selections are for selecting groups, and there are no group summaries in your group selection formula.

In short, group selections should be for summaries only. For example:

Sum({Amount},{PONumber})>10000
The above will only show you those POs greater than $10,000 total

Count({ItemNo},{TransactionDate})>3
Will only show you those groups that have more than 3 transactions for a given part number.


Software Sales, Training, Implementation and Support for Macola, eSynergy, and Crystal Reports
 
Can I have nore than one group with a slection formula? If so I need the group limted so I would use:

GroupName({tccom010.crra}) in {?CredAnalStart} to {?CredAnalEnd} and
GroupName({tccom010.cfcg}) in {?CustGroupStart} to {?CustGroupEnd} and
GroupName ({tccom010.cuno}) in {?CustNoStart} to {?CustNoEnd}

Is this feasible as if I put in more than one group, there are additional records in the group tree
 
GrounpName should not be used is a group selection formula. In fact I believe Groupname({Field}) will return an error.

Filter out the records you do not want in a record selection formula, and the group will of course never exist.

Software Sales, Training, Implementation and Support for Macola, eSynergy, and Crystal Reports
 
The group tree will always reflect the groups that are based on the record selection formula, even if they are then eliminated by the group selection formula, so if the group tree is important to you, you should use the method where all criteria are in the record selection formula.

I disagree with dgillz. You can use the group selection formula to select subsets of records (not just groups), but ordinarily it would tend to slow your report, since more records are returned by the record selection formula--before group selection, which occurs locally.

-LB
 
thanks.... I filtered out the top 2 groups via record selection and the third group does not show on the group tree (I guess there can only be 1 reduction there via group selection)

My report has slowed down to about 50 seconds, but much better than 2-3 min when all criteria was in the record selection. Thanks you everyone for you help.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top