I am losing my mind.... (1 Viewer)

aftershokk

Registered User.
Local time
Today, 05:09
Joined
Sep 5, 2001
Messages
259
It has been many moon since I used Crystal.

I have a basic rpt.

Column 1 sums unit_a in the report footer field = 6
Column 2 sums unit_b in the report footer field = 2

I gave a formula in the report footer field to get a total of 8 units

I want to divide column 1 total of 6 by the total of 8 to get 75% but I just cannot get it to work

please help!
 

SOS

Registered Lunatic
Local time
Yesterday, 21:09
Joined
Aug 27, 2008
Messages
3,517
Just create another formula which does the divide fielda by fieldb and then put it in the footer. It will do the job.
 

aftershokk

Registered User.
Local time
Today, 05:09
Joined
Sep 5, 2001
Messages
259
it keeps coming back as 1.00

Sum ({report_qry_crystal.units_a})/Sum ({@total})
6 / 8
 

SOS

Registered Lunatic
Local time
Yesterday, 21:09
Joined
Aug 27, 2008
Messages
3,517
Don't include the SUM part. The footer takes care of that.
 

SOS

Registered Lunatic
Local time
Yesterday, 21:09
Joined
Aug 27, 2008
Messages
3,517
Just use:

{report_qry_crystal.units_a}/{@total}
 

SOS

Registered Lunatic
Local time
Yesterday, 21:09
Joined
Aug 27, 2008
Messages
3,517
And actually, you wouldn't use @Total you would use COLUMN B
 

aftershokk

Registered User.
Local time
Today, 05:09
Joined
Sep 5, 2001
Messages
259
a is 6
b is 2
the total is 8

I want to divide a / total

I still get 1.00?
 

aftershokk

Registered User.
Local time
Today, 05:09
Joined
Sep 5, 2001
Messages
259
I just figured it our by multiplying the formula by 100 to get a percent - thanks for your help!
 

SOS

Registered Lunatic
Local time
Yesterday, 21:09
Joined
Aug 27, 2008
Messages
3,517
Okay, let's think about this for a minute.

If you put a formula in to the footer that has

Sum(report_qry_crystal.units_a})

then it sums all of A.

If you put a formula into the footer that has

Sum({report_qry_crystal.units_a} + {report_qry_crystal.units_b})

That should give the total sum

If you use a formula that has

Sum({report_qry_crystal.units_a})/
Sum({report_qry_crystal.units_a} + {report_qry_crystal.units_b})

that should get you what you need - theoretically. (fingers crossed)
 

SOS

Registered Lunatic
Local time
Yesterday, 21:09
Joined
Aug 27, 2008
Messages
3,517
ah, okay glad you got it.
 

Users who are viewing this thread

Top Bottom