Solved

Show sum on Maxium Date

Posted on 2008-10-24
10
213 Views
Last Modified: 2011-10-19
I am using Crystal X and I have two tables {agedar} and {client} and trying to show a sum of payments made on the latest date for a specific client.

What I did so far was create two groups based on {client.client#} and {agedar.lastpaydate} and in the detail line put in {client.client#}, {agedar.lastpaydate} and {agedar.amount} with a sum of {agedar.amount} in the {agedar.lastpaydate} group footer. So currently the reports looks something likes this.

Header Line  Client #     Last Pay Date         Amount
Detail Line     00155       10/5/2008               100.00
Detail Line     00155       10/5/2008                 90.00
Footer                           10/5/2008                190.00
Detail Line     00155       10/8/2008                 75.00
Detail Line     00155       10/8/2008                 10.00
Footer Line                    10/8/2008                  85.00
Detail Line     00155      10/10/2008                99.00
Detail Line     00155      10/10/2008                10.00
Footer                          10/10/2008               109.00

How do I make it so the report only shows the maxium date {agedar.lastpaydate} entries? Many thanks in advance to all you experts on Crystal X.


0
Comment
Question by:phle18
  • 6
  • 4
10 Comments
 
LVL 100

Expert Comment

by:mlmcc
ID: 22797081
Try this idea

In the client group header add a formula

WhilePrintingRecords;
Global BooleanVar SuppressDateGroup;
SuppressDateGroup := False;
''

Change the date grpoup to sort descending

In the Date Group Footer add a formula
WhilePrintingRecords;
Global BooleanVar SuppressDateGroup;
SuppressDateGroup := True;
''

Right click the date group header in the left margin
Click SECTIION EXPERT
Click the formula button next to SUPPRESS
WhilePrintingRecords;
Global BooleanVar SuppressDateGroup;
SuppressDateGroup

Repeat for the DETAIL and DATE GROUP FOOTER

mlmcc
0
 

Author Comment

by:phle18
ID: 22797432
Hi ml,

Thanks for helping but when I follow your directions it looks like when I run the report it's only pulling in the first or minimum date as opposed to latest or maxium date.
0
 
LVL 100

Expert Comment

by:mlmcc
ID: 22798323
Did you set the sort order for the date group to descending.

You are correct, it will only get the records for the first date it finds.  By sorting descending, the latest dated record is found first.

mlmcc
0
 

Author Comment

by:phle18
ID: 22798492
When I click on "Group Sort Expert" and then select the date group, there is no option to sort by date, it will only let me sort by sum of the payment.
untitled.JPG
0
 
LVL 100

Expert Comment

by:mlmcc
ID: 22798700
Not in the GROUP SORT EXPERT use the group expert

or from the report
Right click the GROUP HEAER in the left margin
Click CHANGE GROUP
Choose sort order DESCENDING

mlmcc
0
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!

 

Author Comment

by:phle18
ID: 22798978
When I changed the the sort from ascending to descending, it went from a sum of the earlest payments to, the Sum disappearing but it does list all the payments individually which are the latest payment dates.


 
untitled.JPG
0
 
LVL 100

Expert Comment

by:mlmcc
ID: 22799088
You should be able to put the sum back in.

mlmcc
0
 

Accepted Solution

by:
phle18 earned 0 total points
ID: 22799350
Sorry to be be so confusing but I never took it out in the first place. I just does not appear when I run the report but the sum is still there when you view the report in design mode.

Is there another way to just show the maxium sum?

I really appreciate all your help with this.
untitled.JPG
0
 
LVL 100

Expert Comment

by:mlmcc
ID: 22799478
Is group footer 2 set for conditional suppress?

mlmcc
0
 
LVL 100

Expert Comment

by:mlmcc
ID: 22799881
What is the solutiion?

mlmcc
0

Featured Post

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Crystal Report Filter Question 6 48
Not Exists 3 53
Crystal Reports Swap Columns 2 42
Business Object Server 2 22
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 seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
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.

744 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

9 Experts available now in Live!

Get 1:1 Help Now