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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Grouping confusion 1

Status
Not open for further replies.

njahnavi

Technical User
Dec 29, 2008
136
0
0
US
CR XI release 2.

The report has to group by sales performance.
And it has the following values.

Awards A
Awards S
Awards G
x-Awards A
x_Awards S
x-Awards G
y-Awards A
y-Awards S
Y-Awards G
z-Awards A
z-Awards S
z-Awards G
preawards
upcoming awards
Future awards
other awards


User want the report in such a way that it has to show in the above order ..and his specifications goes like this..

1) After Awards A,Awards S,Awards G then he wants to show the total Awards value.
2)And then he wants all the others fall in their own group.

Now the issue is there may be or may not be rows in the Awards A,Awards S,Awards G in one of the groups or all of them.. How can i show the total after these groups...

please suggest...




 
Running totals will accumulate totals for a specific value or range of values. But a Running Total only has the correct value at the end of the report.

You could do a crosstab in the report header, if the format is acceptable. But a crosstab won't show a group with no details.

The best solution may be a subreport in the report header which does running totals and shows them, followed by the details in the main report.

If you're not already familiar with Crystal's automated totals, see FAQ767-6524.

[yinyang] Madawc Williams (East Anglia, UK). Using Windows XP & Crystal 10 [yinyang]
 
I was thinking if there is anyway to avoid subreport..looks like I have to go for it afterall
 
You can do this by creating running totals to be placed in the report footer, one per "group". Use the evaluation section of each running total to define the group, e.g.,

{table.awards} = "Awards A"

-LB

 
if a running total is kept in the report fotter then it will appear after all the groups right..
however i wnat like this

Awards A
rows of these group
Awards S
rows of these group
Awards G
rows of these group

TOTAL OF THE ABOVE GROUPS

x-Awards A
rows of these group
x_Awards S
rows of these group
x-Awards G
rows of these group
y-Awards A
rows of these group

if i am missing something pelase let me know
 
If i get it right.

What you can do is.

Create a formula to place the groups into one name :

if (salesperform=Awards A) or (salesperform=Awards S) -----so on then "First Group" else "Others".


Create a group based on this formula and then
One more group based on the Sales Performance.

You can supress the Group Headers if you don't want to see the Names.

Have totals at the footer.

Hope this helps.
 
I thank you all for replying my post..however i think i have not made my point clear...

The issue is i want the totals to appear at the end of 3rd group not at the end of all groups...Calcualtion of the totals is not the isssue..

I hope i have made myself clear

If i am still not making any sense..please feel free to let me know...
 
Try what i said.
You can have the total at the bottom of the First Group which is nothing but your three groups together.
 
You stated that you wanted totals even if there were no rows in a particular award group--this mean those groups will not appear on the report--which was why I suggested the running total approach.

-LB
 
yes that is true...
I am really sorry if i am making this complicated..

The data should be like this

Awards A (heading)
Rows for it... (details)
Total for Awards Av(footer)
Awards B
Rows for it...
Total for Awards B
Awards c
Rows for it...
Total for Awards c

Total Awards to Date $Amount

x-Awards A
rows of these group
Total For x-Awrds A
x-Awards s
rows of these group
Total For x-Awrds s
x-Awards g
rows of these group
Total For x-Awrds g

If i approach Raja's solution then i will have all the Awards A,B,C in the same group.

If i just take the Rtotals then how willi tell crystal report to print those totals only after Awards A,B,C.

I want the totals to be printed right after the Awards A,B,C and then followed by the other groups...

Thanks a lot Raja and Lb for working on this..
I once again apologize if the infoo has misled you ...




 
You need an outer group that clusters the inner groups. So if you have a group on (it would help to know the name of your field) {table.award}, you would create a formula like this:

//{@OuterGrp}:
if {table.award} in ["Award A","Award B", "Award C"] then
"Main Group" else
"All Others"

Insert a group on this and make it your group #1. Then you can use running totals in the footer for this group, with a reset on change of group: {@OuterGrp}. You can suppress these running totals using the condition {@OuterGrp} = "All Others" if you don't want them after the other cluster.

-LB
 
Thanks Lb.
You have solved this problem..
I am so glad that i am a member of tek-tips.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top