Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: summarizing data based on table Post Reply Post New Topic
Author Message
freida
Newbie
Newbie
Avatar

Joined: 17 Dec 2009
Online Status: Offline
Posts: 3
Quote freida Replybullet Topic: summarizing data based on table
     Posted: 17 Dec 2009 at 5:37am
I am using crystal reports XI.  I have 2 tables and a view, with links
One of my tables is called Members, which lists the membership total for each month.

Month        Membership
Jan               2025
Feb               6041
Mar               3466

I have a view that basically summarizes the revenue every month

Month     Revenue
jan           45000
feb           25000
mar          29000

What my report is does it shows me the Revenue Per person for the current month, the preivous, the current Year to Date(well month selected) and the YTD from the  previous year.

Current and Previous Months work great, but the YTD aren't working
for the YTD I have to do a sum formula to add the membership. 

This is what I want it to do 2025 +6041+3466=11532.  11532 should be my YTD number but it not. 

I think its adding those numbers for each month b/c the number I am getting is alot bigger. 

Is there away that I can just get it to and the numbers from the membership table just once instead of for each detail line?
i
freida
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 17 Dec 2009 at 7:13am
If I understand your problem you can use a variable or a Running Total
a RT would be like:
Field to evaluate=Membership
Type=SUM
evaluate= on change of a field (insert Month field)
Reset=Never
Place on your Report footer
IP IP Logged
freida
Newbie
Newbie
Avatar

Joined: 17 Dec 2009
Online Status: Offline
Posts: 3
Quote freida Replybullet Posted: 17 Dec 2009 at 7:40am
Its still giving me a huge number, because the tables are linked on the month iits adding the numbers each time for the detail.  I make a report with just the members table, I get the correct YTD and prv year YTD.  When I add the revenue table, link the months, and add data the numbers get goofy.  I thought I could add it in as a sub report, but then I was not able to do the division from a field in the sub report by a field in the main report.    
freida
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 17 Dec 2009 at 7:57am

You should be able to use a RT to get the number. You just need to find the correct evaluate option to use.

Do you have this grouped on the a month field? If so change it to evaluate on change of group.
If not can you post some sample row level data showing the duplicates rows.
IP IP Logged
freida
Newbie
Newbie
Avatar

Joined: 17 Dec 2009
Online Status: Offline
Posts: 3
Quote freida Replybullet Posted: 17 Dec 2009 at 9:01am
I don't have group by month, the month is selected in a parameter.  Let say the month picked is Sept. 2009

Page Header:
               9/2009                8/2009      01/2009-09/2009  01/2008 -09/2008
                4000 mem         5000 mem   25000 mem          35000 Mem

Group 1:
Revenue

Group 2:= GL#
     2220  2000 (.50 pm/pm)  4200(1.19)    35000(1.40)         75000(2.00)
     2230  8000(2.00)           15000(3.00)    70000(2.80)       125000(3.57)
   

pm/pm=per member /per month

The ones is blue are the numbers that are not adding up properly, and the only groups I have  is Income(atually is Revenue and expenses), Group 2 is GL #  Then I have the net profit loss in the Report footer.

But there is no group by month there is only one month that the report is based on.
freida
IP IP Logged
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