Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2020 : Technical Questions
Message Icon Topic: Summarizing a Summary Post Reply Post New Topic
Author Message
cfrey
Groupie
Groupie


Joined: 06 Feb 2008
Location: United States
Online Status: Offline
Posts: 55
Quote cfrey Replybullet Topic: Summarizing a Summary
    Posted: 07 Apr 2009 at 9:04am
I have an accounts receivables report the has only grand totals of total, future billed, current, 30 days, 60 days, 90 and over.

I have multiple records per invoice number. I need to summarize the amounts by invoice number. I group the records by invoice number and created a summary of the amount. Then depending on a date or amount I must create the above totals in the footer footer . For instance if the amount is < 0  I have to add it to the current amount.

When I use a running total I get an error that I have a non recurring field in the summary.

What would be the best way to summarize a summary?

Thank you for your help
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 07 Apr 2009 at 12:04pm
This is a little vague. Can you post sample data and what you want to accomplish with it to explain it a bit more?
IP IP Logged
cfrey
Groupie
Groupie


Joined: 06 Feb 2008
Location: United States
Online Status: Offline
Posts: 55
Quote cfrey Replybullet Posted: 07 Apr 2009 at 12:21pm
The data would look like this:


Invoice               Due Date            Amount
123                    3/6/09                -100.00
123                    3/06/09              200.00
                          Total                   100.00
                                        
245                    01/01/09             200.00
245                     01/01/09            300.00
                                                     500.00

578                     01/01/09           -500.00

Invoice # 245 would be totaled in a field of Over 90 days because of the due date.

Invoice 123 would be in Current amount because  of the due date. Invoice 578 would also be in Current but because it is a negative amount. In accounting terms this would be called Not aging credits I am told.

Does this make any sense?

Thanks



IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 07 Apr 2009 at 12:36pm
Couple of questions.
Do you always have your invoice number with the date the same or can one invoice # have dates that fall into more than 1 of your date range categories? If so how do you handle this?
In your example, #578 would be in both the 90 day and the current? If yes it is because the sum for 578 is negative vs #123 where the sum is in the positive?
Thanks
IP IP Logged
cfrey
Groupie
Groupie


Joined: 06 Feb 2008
Location: United States
Online Status: Offline
Posts: 55
Quote cfrey Replybullet Posted: 07 Apr 2009 at 12:51pm
Each Invoice number only has one due date.

#578 would be in current only since the total for the invoice is a negative number.

Thank you
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 07 Apr 2009 at 2:31pm

OK. Try this.

First make sure you use the summary function to get your group footer 1 totals. Do not use a formula. This will make this Summary an available item to select from in your data fields when writing a formula.

You will need to create running total for each of the day categories "total, future billed, current, 30 days, 60 days, 90 and over". You will have to tweak these since I do not know the actual date ranges for each.

Example 1 Running Total as "90_DaysAndOver":

Field to summarize:Amount

as a SUM

Evaulate as "Use a formula": datediff("d",{table.DueDate},currentdate})>89 and Sum (table.amount,invoice#)>0

Reset as Never

 

Example 1 Running Total as "60Days"

Field to summarize:Amount

as a SUM

Evaulate as "Use a formula": datediff("d",{table.DueDate},currentdate}) in 30 to 60 and Sum (table.amount,invoice#)>0

Reset as Never

 

Example 1 Running Total as "30Days"

Field to summarize:Amount

as a SUM

Evaulate as "Use a formula": datediff("d",{table.DueDate},currentdate}) in 1 to 30 and Sum (table.amount,invoice#)>0

Reset as Never

 

Example 1 Running Total as "Current"

Field to summarize:Amount

as a SUM

Evaulate as "Use a formula": datediff("d",{table.DueDate},currentdate})=0 or Sum (table.amount,invoice#)<0

Reset as Never

 

Example 1 Running Total as "FutureBilled"

Field to summarize:Amount

as a SUM

Evaulate as "Use a formula": datediff("d",{table.DueDate},currentdate})<0 and Sum (table.amount,invoice#)>0

Reset as Never

IP IP Logged
cfrey
Groupie
Groupie


Joined: 06 Feb 2008
Location: United States
Online Status: Offline
Posts: 55
Quote cfrey Replybullet Posted: 08 Apr 2009 at 7:20am
Thank you. Works very well. You were a  great Help!
IP IP Logged
Post Reply Post New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum



This page was generated in 0.031 seconds.