Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2020 : Report Design
Message Icon Topic: dividing 2 fields in a text object Post Reply Post New Topic
Author Message
merrittr
Newbie
Newbie


Joined: 29 May 2018
Location: Canada
Online Status: Offline
Posts: 9
Quote merrittr Replybullet Topic: dividing 2 fields in a text object
    Posted: 11 Jun 2018 at 6:58am
I have 2 fields in a text object (see below)

{1Sum of @del_ammount_over500K}/{2%totalBalanceOfLoans}

what I would like is to have the above actually be a number not

1,000,000/500,000,000 so I would like it to show as .20 how do I get that division taken literally in a text object?

I am using crystal reports 11 if that makes a difference

Edited by merrittr - 11 Jun 2018 at 7:01am
IP IP Logged
kevlray
Admin Group
Admin Group
Avatar

Joined: 29 Oct 2009
Online Status: Offline
Posts: 1587
Quote kevlray Replybullet Posted: 12 Jun 2018 at 4:07am
So you have to have a formula with the above equation in it ( {1Sum of @del_ammount_over500K}/{2%totalBalanceOfLoans}, then you can put that formula almost anywhere (including a text object).
IP IP Logged
merrittr
Newbie
Newbie


Joined: 29 May 2018
Location: Canada
Online Status: Offline
Posts: 9
Quote merrittr Replybullet Posted: 12 Jun 2018 at 8:01am
It doesn't actually do the math/algebra

I just get 100/500 in the test box not .2 so me just typing "/" in the text object doesn't get it to do the division operation? is there an EVAL() function that I need to wrap it in?
IP IP Logged
kevlray
Admin Group
Admin Group
Avatar

Joined: 29 Oct 2009
Online Status: Offline
Posts: 1587
Quote kevlray Replybullet Posted: 12 Jun 2018 at 10:48am
You don't get it.  Separate formula to do the calculation.  Then put that formula in the text box. Unfortunately I cannot send you a sample.  I tried including screen shots, but they are not coming through.








Edited by kevlray - 12 Jun 2018 at 10:51am
IP IP Logged
merrittr
Newbie
Newbie


Joined: 29 May 2018
Location: Canada
Online Status: Offline
Posts: 9
Quote merrittr Replybullet Posted: 12 Jun 2018 at 12:55pm
OK I think I understand what you are saying, but here is my problem

the denominator (Sum of @del_ammount_over500k) is a running total so it does not show up in any of the fields
for me to build the formula

if you like you can email me at r.l.c99@live.ca




Edited by merrittr - 13 Jun 2018 at 7:12am
IP IP Logged
merrittr
Newbie
Newbie


Joined: 29 May 2018
Location: Canada
Online Status: Offline
Posts: 9
Quote merrittr Replybullet Posted: 14 Jun 2018 at 4:28am
I am wondering if this should be in the technical question group?
IP IP Logged
kevlray
Admin Group
Admin Group
Avatar

Joined: 29 Oct 2009
Online Status: Offline
Posts: 1587
Quote kevlray Replybullet Posted: 14 Jun 2018 at 4:31am
Put it in a formula and go from there.
IP IP Logged
merrittr
Newbie
Newbie


Joined: 29 May 2018
Location: Canada
Online Status: Offline
Posts: 9
Quote merrittr Replybullet Posted: 15 Jun 2018 at 10:48am
yup that did work , all the fields I needed were in report fields thanks KelvRay
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.