Quantcast
Channel: SCN : All Content - All Communities
Viewing all articles
Browse latest Browse all 3353

Shared Numbervar Variable question about Totals

$
0
0

Hello

  I am using CR version 11.512.1838 and I have a report that has

Pager Header

Group Header #1a where it has a customer_no, on this group I display some text and an address information

Group Header #1b where it has a customer_no, nothing to display

Group Header #2a where it has a customer_store_no and address, I display only the group by which is the storeno and address

Group Header #2b where it has a customer_store_no and address, I display here the header information , invoice_no,invoice_date,invoice_amount_due,days_old,currency_code

--------------

Group Header #3 is currency_code, on this group I have a formula(see below), with help of "Abhilash Kumar" I was able to get this formula to work.

Details is where I display the details

Group footer #3 is currency code , I display the subtotal amount per currency code

Group footer #1 is customerno

Report footer

Page footer : I display the totals per currency code, depending on how many currency codes the customerno has, it can be up to 5( was able to get this also with the help of "Abhilash Kumar" on another post.


If {table_one.currency} = 'CHF'

Then

Shared Numbervar CHF_currency :=Sum ({table_one.AMOUNT_DUE}, {table_one.currency})

Else if {table_one.currency} = 'EUR'

Then

Shared Numbervar EUR_currency :=Sum ({table_one.AMOUNT_DUE}, {table_one.currency})

Else if {table_one.currency} = 'USD'

Then

Shared Numbervar USD_currency :=Sum ({table_one.AMOUNT_DUE}, {table_one.currency})

Else if {table_one.currency} = 'GBP'

Then

Shared Numbervar GBP_currency :=Sum ({table_one.AMOUNT_DUE}, {table_one.currency})

Else if {table_one.currency} = 'PLN'

Then

Shared Numbervar PLN_currency :=Sum ({table_one.AMOUNT_DUE}, {table_one.currency})

 

and I have 5 other formulas to display the result of this one on the page footer depend on the currency_code but the issue I am having is that since I am grouping by customerno,store_no_address and currency code sometimes the total amount may be 0.00 for let's say store no 123 but for store no 456 the amount can be 10.00 now the result I am getting for the shared numbervar is always the last record and if that one is 0.00 then the total amount I am displaying on the page footer is also 0.00 where in this example it should be 10.00 instead.  I even suppressed every thing on the report when the subtotal per currency is 0.00 but still getting the wrong total .

Thank you for your help on this


Viewing all articles
Browse latest Browse all 3353

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>