[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

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

limiting result in crystal report formula field with a where

Is there any way to limit a formula field with a select statement?  I want to be able to create multiple summed values but each one for a diferent value in a column of the dataset.

Filter   #Elements
A            5
A            7
B            2
A            7
B            10
B            10

I want to be able to create one formula SumA and another one that is SumB.  I can easily see how to sum all the #Elements but not how to filter the formula.  Any ideas how to do that?

Thanks!
0
jrepdev
Asked:
jrepdev
  • 3
  • 3
  • 2
1 Solution
 
kingjelyCommented:
Please Show the results you expect to see.
0
 
kingjelyCommented:
do you mean

filter  #element
6        41
0
 
mlmccCommented:
Try this
Name - A_Values
If {FilterField} = 'A' then
   {#Elements}
else
    0

Name - B_Values
If {FilterField} = 'B' then
   {#Elements}
else
    0

You can then summ the formulas and show the values.

mlmcc
0
Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
jrepdevAuthor Commented:
mlmcc,

I have done this but it seems that is a fixed number.  It does not filter for selections by groups in the report.  Is there anyway to do this and have the results relate to the group section it appears in?

Eva
0
 
mlmccCommented:
Put the formula in the detail section
Right click it
Click INSERT --> SUMMARY
Set it as a SUM
Insert it into all group footers

mlmcc
0
 
jrepdevAuthor Commented:
Bottom line is I can't do what I want to do so I have completely altered my approach.  Thanks team for all your help!
0
 
mlmccCommented:
Can you show given the data what you want displayed?

mlmcc
0
 
jrepdevAuthor Commented:
I discovered I could not do what I want to do.
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

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