[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index]
[Date Index]
[Thread Index]
[SQR-USERS Info]
[SQRUG Home Page]
[sqr-users] SQR Bug.
Hi All,
I am using SQR v6.1.3 on my Win2K PC, and running against an Oracle
database.
I have had a report that has worked fine for the last 5 months. My
company as just migrated the rest of the data from there old system to
the new system so the report now sums up 5 times the data. The problem I
am having is that I run a SELECT statement to return a value. The value
returned from the query is correct, but when I assign it to a global
variable, the number changes.
Here is the offending source code...
begin-select
sum(TOTAL_DOCL_PRICE) &sales
sum(nvl((select sum(TAX_VALUE) FROM DOCL_TAXES Where DOCL_DOC_ID =
l.doc_id and DOCL_LINE_ID = l.line_id and (ANALYSIS_CODE like '%-PSD-O%'
or ANALYSIS_CODE like '%-LCT-O%')),0)) &psd_exclude_amount
add &sales to #_gf_prim_g1 ! ***************
offending line
add &psd_exclude_amount to #_gf_prim_g3
add &psd_exclude_amount to #_gf_sec_g3
subtract #_gf_extra_ar_gst_error from #_gf_prim_g1
from doc d,
...
After the end-select I show the values to write them to the log file
#debugt show ''
#debugt show 'SALES : ' &sales ' Current G1 : '
#_gf_prim_g1
#debugt show ''
The results in the log file are as follows...
SALES : 38925864.48 Current G1 : 37114136.550000
I have tried altering the code and instead of using ADD I used "let
#_gf_prim_g1 = #_gf_prim_g1 + &sales", "let #_gf_prim_g1 = &sales" and
"let #_gf_prim_g1 = &sales * 1.0", but they all produce the same error.
My first guess would have been a size restriction on the FLOAT data type
but I have other reports on other systems that have values in the
billions of dollars. This is only $37 million.
Has anyone encountered anything like this before? Does anyone have any
ideas on how to fix it or code around it to give the variable the right
value?
Thanks in advance.
Regards,
Ian Mills
ORIX Australia Corp. Ltd.
_______________________________________________
sqr-users mailing list
sqr-users@sqrug.org
http://www.sqrug.org/mailman/listinfo/sqr-users