Print Page | Close Window

dividing 2 fields in a text object

Printed From: Crystal Reports Book
Category: Crystal Reports 9 through 2020
Forum Name: Report Design
Forum Discription: The best way to design a report and problems you have encountered
URL: http://www.crystalreportsbook.com/forum/forum_posts.asp?TID=22623
Printed Date: 25 Apr 2024 at 1:30pm


Topic: dividing 2 fields in a text object
Posted By: merrittr
Subject: dividing 2 fields in a text object
Date 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



Replies:
Posted By: kevlray
Date 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).


Posted By: merrittr
Date 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?


Posted By: kevlray
Date 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.








Posted By: merrittr
Date 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




Posted By: merrittr
Date Posted: 14 Jun 2018 at 4:28am
I am wondering if this should be in the technical question group?


Posted By: kevlray
Date Posted: 14 Jun 2018 at 4:31am
Put it in a formula and go from there.


Posted By: merrittr
Date Posted: 15 Jun 2018 at 10:48am
yup that did work , all the fields I needed were in report fields thanks KelvRay



Print Page | Close Window