Solved

limiting result in crystal report formula field with a where

Posted on 2011-03-16
8
385 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

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.

 

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
 
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

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

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.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

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. …
I hate sub reports and always consider them the last resort in any reporting solution.  The negative effect on performance and maintainability is just not worth the easy ride they give the report writer.  Nine times out of ten reporting requirements…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…

749 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