Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Chart based on running total returns wrong data 1

Status
Not open for further replies.

mnasuto

Technical User
Oct 22, 2001
87
GB
Hi !
I am using Crystal 8.
Data:

date ordernumber orderamount
1-10-04 1 10000
1-10-04 2 20000
1-10-04 3 4500
3-10-04 4 3000
3-10-04 5 41500

I have very simple report with 2 groups:

1st -- date
2nd -- ordernumber

I defined running total field in order to display cumulative sales amount.

In group futer GF1 am displaying:

date amount cumulativeamount
1-10-04 34500 34500
3-10-04 10000 44500

Calculations on report are correct but when I try to do chart is not displaying right numbers.

Chart is displaying

10 000 for 1-10-04
3 000 for 3-10-04

What am I doing wrong?

My running total is sum of orderamount
Evaluate On change of group#2
Reset Never


Please help if you can.



 
Your chart should be placed either in the report header or in the report footer. I'm assuming you are using your date field as the "on change of" field, and {#yourrt} as the summary field.

-LB
 
Thaks for you replay.

My chart is placed in report header and I am using date field as the on change of field and rt as summary field.
It looks like on chart is displaying only first records after group change.
Data:

date ordernumber orderamount
1-10-04 1 10000
1-10-04 2 20000
1-10-04 3 4500
3-10-04 4 3000
3-10-04 5 41500
Chart is displaying

10 000 for 1-10-04
3 000 for 3-10-04



Please help if you can.
 
What happens if you change it to Evaluate For each record? It is as if you get just the first record for each date.

[yinyang] Madawc Williams (East Anglia, UK) [yinyang]
 
After changing to Evaluate For each record chart is exactly
this same.
 
Try starting again. Maybe a summary total, since you are not doing anything complex.

[yinyang] Madawc Williams (East Anglia, UK) [yinyang]
 
I did. This time I created just one group date:
Report looks like:

DATE orderamount RT
01/10/2004
01/10/2004 25000 25000


05/10/2004
05/10/2004 10220 35220


11/10/2004
11/10/2004 50203 85423

11/10/2004 5000 90423

11/10/2004 9146 99569

11/10/2004 1175 100744

11/10/2004 15483 116227

11/10/2004 18474 134701

11/10/2004 9677 144378

11/10/2004 6451 150829

11/10/2004 30000 180829

11/10/2004 13500 194329



Chart displays:
01/10/2004 25000


05/10/2004 35220



11/10/2004 85423


 
Okay, I was able to recreate the problem. Change your running total so that for the evaluation section you are using "on change of field"->{table.date}.

This corrects the problem here.

-LB
 
Please ignore my last post--that's still not right.

-LB
 
Thank you for your reply.

If I do that my stats are changing , but stats where ok, chart was returning errors.
I have to display running Total = cumulative total
not sum of order for month.
Chart displays:
01/10/2004 25000
05/10/2004 35220
11/10/2004 85423

Chart schould displays:
01/10/2004 25000
05/10/2004 35220
11/10/2004 194329
 
This is as close as I could get in 8.0. Use the running total expert to create {#sumamt}: Choose {table.amt}, sum, evaluate based on a formula and enter:

onlastrecord or
{Orders.Order Number} <> next({Orders.Order Number})

Reset never. Then create a formula {@nextdate}:

if onlastrecord or
{table.date} <> next({table.date}) then {table.date}

In the chart expert->advanced tab, choose {@nextdate} for the on change of field and {#sumamt} for the summary (check don't summarize values). This should give you a chart with the correct values per date, but there will be one bar on the left with no date (all values that don't meet the criteria for displaying a date in {@nextdate}. The only (weak) solution I could see for this was to use the chart analyzer to make that specific bar transparent and to eliminate the lines around the bar, although this eliminates the lines for all bars. Not very good, but the best I could come up with.

-LB
 
Thank you very much for this solution Lbass.
Your idea is very good and you are getting star from me.
Thank you!

Is anyone who knows how to solve this problem compleately?

Please help if you can.

Best,
Marta
 
Marta - For what it is worth I am having the same problem. Based on the Business Objects (BO) web site this is an ongoing problem for Crystal 7.0 - 8.5. There are some specific patches to download. I have just found this problem today and have to go through my IT department before accessing these patches and thus cannot say if the problem is corrected - thought you might get a jump start on it and let me know what happens.

Here are 2 links to the issue on BO:



Hope this helps,
Kevin
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top