Showing results for 
Search instead for 
Did you mean: 

Showing sums for different groups in one text field

Former Member
0 Kudos


This is my first post. I've searched through the forums, but I haven't found anything helpful. That could be due to lack of experience, and not exactly knowing what I'm looking for, but here goes...

My problem is this:

I want to put a sum field in a text field, and also want the sum of the previous year to appear in the same text field. Something like this:

So far this year we have approved 1 234 (1 092) persons...

The sum inside the brackets being the corresponding sum for the same period the previous year.

I've made 2 parameter fields, one for setting the current period, and one for setting the period the previous year.

Based on these parameter fields I can assign the rows to different groups, and this works fine. The group sums that I have put in the group headers also show the correct numbers.

The problem is I want both of these sums in ONE text field for example in the report header, but I can't figure out how to make that happen.

I'm running Crystal Reports 2008.

Any help would be greatly appreciated.

Thanks in advance!


Mattias Elm

View Entire Topic
Former Member
0 Kudos

You can write a formula and try to do the concatenation there and put this formula field in a text box.

Hope this helps!!

Former Member
0 Kudos

I have CRXI, but this should work

create your formula

"So far this year we have approved " & &"( " & &") persons"

Former Member
0 Kudos

Thank you both for your replies.

However, this doesn't solve the problem. The numbers I want to use in the text are both SUMs from different groups. It seems these can only exist on the group level, and when you move the SUM field it doesn't retain the value (since it's no longer in the group). Neither can I put the text I want in the group headers, since the SUMs needed are from two different groups.

I'm guessing I could use a variable somehow, but I can't figure out how to do that.

Any further help would be greatly appreciated.

Former Member
0 Kudos

I think you'll have to pay attention to the 'Crystal Report Processing Engine' and the order crystal processes a report (do a quick google search or

Firstly pass your sum values to variables and pay attention to Evaluation Time functions (BeforeReadingRecords,WhileReadingRecords etc)

hope that points you in the right direction,