Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Problem w/ running total on converted field Post Reply Post New Topic
Author Message
BIM75
Newbie
Newbie
Avatar

Joined: 17 Jul 2008
Location: United States
Online Status: Offline
Posts: 7
Quote BIM75 Replybullet Topic: Problem w/ running total on converted field
    Posted: 05 Mar 2009 at 1:29pm
Hello,  I am using CR 10 with Oracle.  I am developing a report to show the quantity of product sent for each customer.  The report layout is as follows:
 
Group1: Product
  Group2: Customer      Quantity
 
We only use numbers in the 'Quantity' field however it is set as a string.
 
I used the following formula to convert the string field to a number;
 
tonumber ({PRODUCT.QUANTITY})
 
and then I created a running total using the above formula as the field to summarize.  Type of summary is 'SUM' and I am evaluating based on a change in group 1. 
 
It appears that I am getting a count instead of a sum.
 
My results look like this:
 
Product X
   Cust 1           2
   Cust 2           2
subtotal:          2 (this should be 4)
 
I feel like I am missing something really basic.  Any thoughts would be appreciated.
 
Thanks
 
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 05 Mar 2009 at 2:04pm
Try evaluate for each record
and reset on change of group1
 
and/or
make sure you place this on group footer1 (not groupfooter2)


Edited by DBlank - 05 Mar 2009 at 2:07pm
IP IP Logged
BIM75
Newbie
Newbie
Avatar

Joined: 17 Jul 2008
Location: United States
Online Status: Offline
Posts: 7
Quote BIM75 Replybullet Posted: 05 Mar 2009 at 6:56pm
Thanks for your response. 
I placed it on GF1 and tried switching to evaluate for each record.  Unfortunately the running total now appears to be giving a distinct count of customers as the result is equal to the number of customers in the report instead of the sum. 
Very strange.
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 06 Mar 2009 at 6:40am
In this case an easier process is to use the Summary function instead of the running total...
Click on the Insert Summary button
Select the formula field using (tonumber ({PRODUCT.QUANTITY})) as the field to summarize
Calculate as a SUM
Summary location as group1.
A summary function can be placed in the GF1 or GH1 (inlike a running total which cannot be in a header).
Did this work?
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.000 seconds.