?
Solved

Multiple filter in Crystal Report

Posted on 2003-02-19
5
Medium Priority
?
301 Views
Last Modified: 2012-05-04
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?
Thanks in advance.
0
Comment
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
  • Learn & ask questions
  • 2
  • 2
5 Comments
 
LVL 101

Expert Comment

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

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

FORK12 should read as
    if k = 1 or k = 2 then
       v
    else
   0
FORK34 shold read as
    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

by:rock2003
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

by:rock2003
ID: 7981970
Thanks a lot for your answers, Srini_jg.
0
 
LVL 101

Expert Comment

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

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

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…

766 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