Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 332
  • Last Modified:

crystal reports sum() with no grouping

Hi

I am producing a report in crystal reports for VS 2010

The report is listing a number of items, each categorised but not grouped.

I have 3 categories to make a sum of the units in each... so I have tried something like this

example:

nuts 3
bolts 10
nuts 3
washers 8
nuts 4
bolts 5
washers 3

Totals:
nuts: 10
bolts: 15
washers: 11



Local NumberVar tot;
if {Command.group} = 0 Then
    tot := tot + {Command.units};

tot

Open in new window


but this isn't working as expected... how can I achieve the results I need?
0
cycledude
Asked:
cycledude
  • 2
1 Solution
 
cycledudeAuthor Commented:
I got this working now...

I used 'running total fields' and put a formula in there like

{command.group} = 0
{command.group} = 1
{command.group} = 2


so I have a field per category and they are calculating the sums correctly now.

Happy days

;o)
0
 
cycledudeAuthor Commented:
for future reference
0

Featured Post

[Webinar] Cloud and Mobile-First Strategy

Maybe you’ve fully adopted the cloud since the beginning. Or maybe you started with on-prem resources but are pursuing a “cloud and mobile first” strategy. Getting to that end state has its challenges. Discover how to build out a 100% cloud and mobile IT strategy in this webinar.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now