Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2020 : Technical Questions
Message Icon Topic: Group results in a different group Post Reply Post New Topic
Author Message
peteGE
Newbie
Newbie


Joined: 25 Jul 2014
Online Status: Offline
Posts: 2
Quote peteGE Replybullet Topic: Group results in a different group
    Posted: 02 Oct 2014 at 12:20am
Hello,
 
I`ve got a report where I want to group results by a deal number but also want to sum one field by another group.
 
I have my fields in group footer which is grouped by deal_no.
 
Then I have a field where I`m trying to summarize amount per a column comments in DB using command:
Sum({Command.AMOUNT},{Command.TRIM(REGEXP_REPLACE(B.COMMENTS,'CUM'))})
So I`ve got another group in my report - {Command.TRIM(REGEXP_REPLACE(B.COMMENTS,'CUM'))}.
 
Since I want to have my report sorted by deal_no I`ve got them in group footer grouped by DEAL_NO. However, if I count the sum of the field above it also summarize the results by deal number but I`d like to have it summarized by the command.
 
Is there any way how to do it? Can I summarize a field grouped by command within another group (grouped by deal_no)?
 
Thank you.
 
Best regards,
 
Petr
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 02 Oct 2014 at 3:49am
If you want the summary in the group header or footer you can summarize a sub set of records that fall inside that group. It will not include records that are in another group. The only way to do that would be to use a subreport that re-queries the entire data set that is used int he main report.
 
EDIT: If you used a variable formula in the main report it could include records that are printed before the display location but it would not include records after the display location.


Edited by DBlank - 02 Oct 2014 at 3:50am
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.031 seconds.