Solved

limiting result in crystal report formula field with a where

Posted on 2011-03-16
8
360 Views
Last Modified: 2012-05-11
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
Comment
Question by:jrepdev
  • 3
  • 3
  • 2
8 Comments
 
LVL 8

Expert Comment

by:kingjely
ID: 35153572
Please Show the results you expect to see.
0
 
LVL 8

Expert Comment

by:kingjely
ID: 35153577
do you mean

filter  #element
6        41
0
 
LVL 100

Expert Comment

by:mlmcc
ID: 35153661
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
 

Author Comment

by:jrepdev
ID: 35157507
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
Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

 
LVL 100

Expert Comment

by:mlmcc
ID: 35159323
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
 

Accepted Solution

by:
jrepdev earned 0 total points
ID: 35300709
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
 
LVL 100

Expert Comment

by:mlmcc
ID: 35300978
Can you show given the data what you want displayed?

mlmcc
0
 

Author Closing Comment

by:jrepdev
ID: 35331378
I discovered I could not do what I want to do.
0

Featured Post

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Crystal Reports: 5 Tests for Top Performance It is complete, your masterpiece report.  Not only does it meet your customer’s expectations, it blows them out the water, all they want is beautifully summarised and displayed in a myriad of ways. …
Hello everyone, Hope you find this as helpful as we did. We have on the company I work for an application built in Delphi V with Crystal Reports 8. We all know that Crystal & Delphi can be temperamental sometimes and the worst thing is, nearly…
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

760 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now