Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: Computing Problem Post Reply Post New Topic
Author Message
Lehgzil
Newbie
Newbie


Joined: 24 Jul 2011
Online Status: Offline
Posts: 4
Quote Lehgzil Replybullet Topic: Computing Problem
    Posted: 24 Jul 2011 at 4:37pm

Good Day Everyone,

Im using Crystal Reports 10 for the first time and would like some help,
ive linked it to VB 6 and MySql.
and use cross-tab to view my reports however,
i  got this problem on which i can programmaticaly solve on vb6 listview...
 
here it is,
 
i got 5 columns
 
 
Int Amount   Accu Amount   Int/Mo   Accu/Int      OB
 
lets say
Val = database amount on SQL
Rate = database amount on SQL
 
Int Amount = Val
Accu Amount = total of Int Amount or ( X = X + IntAmount)
Int/Mo = if rowcount = 1 then int/Mo = 0 else value of accu Amount(row count - 1) * Rate
Accu/Int = Int/Mo + Accu/Int(row count - 1)
OB = Accu Amount + Accu/Int
 
on which it would look like this
 
Val = 140
Rate = .0005
 
Int Amount   Accu Amount   Int/Mo   Accu/Int      OB
140               140                 0          0                 140
140                280                .70       .70               280.70
140                420               1.40     2.10              422.10
140                560               2.10     4.20              564.20
.......
 
i can do OB and Accu Amount but i cant get past Int/mo and Accu/int
or i cant get value of row-1 like 140*.0005 to get .70 and 1.40+.70 to get
2.10.
 
or simply how to get value of previous row values
 
 
help anyone?
~liz
 
 
 
 
 
 
 
IP IP Logged
hilfy
Admin Group
Admin Group
Avatar

Joined: 20 Nov 2006
Online Status: Offline
Posts: 3702
Quote hilfy Replybullet Posted: 25 Jul 2011 at 8:12am
Have you looked at Running Total fields instead of summaries?  You would have to get rid of the cross-tab and format the rows of data yourself, but this way you can set up running totals that will give you a running value as each row is processed.
 
-Dell
IP IP Logged
Lehgzil
Newbie
Newbie


Joined: 24 Jul 2011
Online Status: Offline
Posts: 4
Quote Lehgzil Replybullet Posted: 25 Jul 2011 at 2:45pm
Thanks Dell,

btw do you have a link to where it may lead me to a tutorial about running total fields, im checking it now but it seems i have not get it to work.

~liz
IP IP Logged
Lehgzil
Newbie
Newbie


Joined: 24 Jul 2011
Online Status: Offline
Posts: 4
Quote Lehgzil Replybullet Posted: 26 Jul 2011 at 2:23pm
^up just a follow up.

if anyone knows how to solve the above problem please help.
thanks

~liz
IP IP Logged
sharona
Senior Member
Senior Member
Avatar

Joined: 16 Oct 2008
Location: United States
Online Status: Offline
Posts: 255
Quote sharona Replybullet Posted: 27 Jul 2011 at 2:14am

MANUAL RUNNING TOTALS

 

RESET

The reset formula is placed in a group header report header to reset the summary to zero for each unique record it groups by.

 

whileprintingrecords;

                                                Numbervar  X := 0;

 

CALCULATION

The calculation is placed adjacent to the field or formula that is being calculated.

(if there are duplicate values; create a group on the field that is being calculated on. If there are not duplicate records, the detail section is used.

 

whileprintingrecords;

                                                Numbervar  X := x + {field}; ( or formula)

 

DISPLAY

The display is the sum of what is being calculated. This is placed in a group, page or report footer. (generally placed in the group footer of the group header where the reset is placed.)

whileprintingrecords;

                                                Numbervar  X;

                                                X

 



Edited by sharona - 27 Jul 2011 at 2:14am
sharona
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.012 seconds.