Steve,

You mention that it is only if there are no charges IN (31,32) that you have 
problems.

Try counting the number of rows in the charges table where 31 or 32.
If the number of rows > 0 then do the total ELSE change the total.
Something like this.
TOTAL = (IFGT(.vRowCount,0, (.TTLWHSC - Discount + 
.vHandlingCharge),(.TTLWHSC - Discount)))

I know this is a horible explanation but without knowing your entire 
structure it's kind
of hard.

Jan
 


-----Original Message-----
From: "Steve Breen" <[email protected]>
To: [email protected] (RBASE-L Mailing List)
Date: Mon, 9 Mar 2009 16:20:04 -0400
Subject: [RBASE-L] - Re: Report variable ?


Razzak,

I wish it were just normalization.

It is more me not getting it.

I have to apply a discount on a report that is in the Cust_Discount table 
with a id CustNub2.  The Master Table has both CustNub2 and Pon. The Charges 
table has Pon as it ID. There is no reason for the CustNub2 to be in the 
Charges Table or the Pon to be in the Cust_Discount Table.

I was trying to show a discount on the invoice that is stored in the 
Cust_Discount table. The report is based on the Master table. The discount 
worked great when there was a handling charge in the Charges table but in 
some cases there is no handling charge in the table and all and that is when 
I ran into trouble. Not sure where to turn. 



TOTAL =  (.TTLWHSC - Discount + .vHandlingCharge)



ACTUAL    HANDLING   DISCOUNT    TOTAL
EXPENSE    CHARGE               EXPENSE
────────────────────────────────────────

 

-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of A. Razzak 
Memon
Sent: Monday, March 09, 2009 3:46 PM
To: RBASE-L Mailing List
Subject: [RBASE-L] - Re: Report variable ?

At 03:37 PM 3/9/2009, Steve Breen wrote:
>Razzak,
>
>There in lay my issue.
>
>PON is in Master and Charges table but not in the Cust_Discount table.
>
>The relation between Master and Cust_Discount is CustNub2
>
>This is where I start having issues.


Well ... that is where you have to take care of your own data normalization 
issues and more ...

R:BASE is doing what it is supposed to do. However, R:BASE will provide you 
with the appropriate -ERROR- message(s), so that you can correct things as 
deemed necessary.

Very Best R:egards,

Razzak.

Reply via email to