View Full Version : a calculation and dislay problem in my report


RolleR
04-18-2007, 11:38 AM
Hi all,

I'm working on a DB for my work but i'm having problems with my report

The report is showing an overview about the machine th customer wants and what it will cost. Now the problem starts with th discount on the total price. whn we choose any kind of discount there is no problem but there are customers that don't get a discount and here the problems starts. I calculated the total price with discount in a field below the discount field like this : price x discount ( the discount is put in 0, 25 for example) and the calculation is working but when i want to do the calculation with no discount then i have to do the folowing : Price x discount and here is the value for discount = 1, now the field that shows the discount is in % so 0,25 becomes 25% but when w do this with 1 we get 100% and that is not good for a customer that has no discount:)

Now i tried to solve this with the if... then .. else and the iff true part and false part, but it doesnt work because ... i don't know,

This is what i typed in : IIf([Discount]=1;"no discount";[Discount]) but i think there is something wrong with the false part but don't know what,

Can anybody help m please

Thx

Rich
04-18-2007, 12:12 PM
If the discount is zero then surely it should be zero?:confused:

mantis
04-26-2007, 01:44 PM
I think your calc should be if([Discount]=0;"no discount";[Discount]).

The statement works like this: IF(test;value if true;value if false)

Say your discount is 0 - If(0=0;"no discount";0); the output would be "no discount".
If your discount was 25 - If (25=0;"no discount";25); the output would be 25.