Solved

# Multiple filter in Crystal Report

Posted on 2003-02-19
Medium Priority
301 Views
I have a table specified like the following:
Column Name          Data Type
K                    Number
V                    Number
I want to use Crystal Report to report results below:
- A field which contains Sum of V where K is in 1 to 2.
- A field which contains Sum of V where K is in 3 to 4.
What should I do?
Can anyone help me?
0
Question by:rock2003
[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
• 2
• 2

LVL 101

Expert Comment

ID: 7981548
Use a running total.

Open the report
Create a new running total
Give the running total a name - V_Sum12
Field to summarize - V
Type of summary - SUM
Evaluate - Use a formula - K >= 1 and K <= 2
Reset - Never

Do a similar formula for the other case

mlmcc

0

LVL 1

Accepted Solution

srini_jg earned 90 total points
ID: 7981716
Create two formula fiedls. FORK12 and FORk34

if k = 1 or k = 2 then
v
else
0
if k = 3 or k = 4 then
v
else
0
Place these in the details sections as two fields.

You can then insert the sum for these fields in the Group Footer / Grand Total.

Srini
0

Author Comment

ID: 7981881
Hi, mlmcc!
Suppose that data of the table were:
(K, V) = {(1,1), (2,2), (3,3), (4,4)}
I create 2 running total field as you suggest. Then I put them into the Report Header section (not the Details section).
When I preview the report, it shows wrong results like the following:
V_Sum12: 1
V_Sum34: null
Can you help me shoot this problem?
Thanks.
0

Author Comment

ID: 7981970
0

LVL 101

Expert Comment

ID: 7984027
The running totals get calculated as the report runs.  Putting them in the header only accounts for the first record.  Totals were correct.

Try putting them in the report footer.

mlmcc
0

## Featured Post

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. …
Hot fix for .Net Crystal Reports 10.2.3600.0 to fix problems with sub reports running on 64 bit operating systems ISSUE: Reports which contain subreports fail with error "Missing Parameter Value" DEPLOYMENT SERVER OS: Windows 2008 with 64 bi…
In this video we outline the Physical Segments view of NetCrunch network monitor. By following this brief how-to video, you will be able to learn how NetCrunch visualizes your network, how granular is the information collected, as well as where to f…
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…
###### Suggested Courses
Course of the Month8 days, 6 hours left to enroll