× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Hey Raul, that really have perfect sense.  You really learn something new every
day!

Thank you!

Peter Vidal
Pall Aeropower Corp.
SR Programmer Analyst
WWW.Pall.com

"A good player makes himself look good; a great player makes the team look
good."
Author unknown

/
==================================================================================/
You can not use edited numbers in arithmetic, and you can not edit a
number just for display.  I'll love to have a "DTW_EDITC..."

In the SQL you can also select the difference.  Or, you can select the
amounts two times, one edited and the other one for arithmetic.

not prety.

Raul

Peter Vidal wrote:

>Hi list!
>
>I have this @DTW_SUBTRACT function that is blowing up wit hthe message:
NET.DATA
>Error: Function call to DTW_SUBTRACT failed. Error Number is 4001.  Obviously,
>this is the message when one of the parameters is not a number.  I am printing
>V3 and V4 and they are displayed as a number.  The last statement of this code
>is the one that explodes.  In this case, BUDGET is "0" and the expenses is
>"5,519-", but I can't substract the BUDGET from the DISBURSEone.   Before
>calling the SQL1 function, I am executing @DTW_ASSIGN(DTW_EDIT_CODES,"  JJJJ")
>to format the fields.  That is why the expenses amount has a format with commas
>in it.
>
>Please check these code and see if I am skipping something...
>
>%FUNCTION(DTW_SQL) sql1(OUT t1) {
>SELECT DEPARTMENT, DEPTNAME, INTEGER(SUM(BUDGET)), INTEGER(SUM(DISBURSE))
>FROM $(library).XDBUDGT
>WHERE RECORDTYPE = '$(ptd)' AND FISYEAR = $(syr) AND FISQTR <= $(fqtr)
>$(locwhere)
>GROUP BY DEPARTMENT, DEPTNAME
>ORDER BY DEPARTMENT, DEPTNAME
>%REPORT {
><center>
>  <table border=3>
>    <tr>
>     <th>Dept</th>
>     <th>Description</th>
>     <th>Budget</th>
>     <th>Expenses</th>
>     <th>Variance<br>Over/<font color="red">Under</font><br>Budget<br>
$(rt)</th>
>     <th>Percent<br>Over/<font color="red">Under</font><br>Budget<br>$(rt)</th>
>    </tr>
>%ROW {
>    <tr>
>     <td>
>      <a href=xdbudacct/Report?dpt=$(V1)&fyr=$(fyr)&dptn=@DTW_rURLESCSEQ(V2)
&syr
>=$(syr)&loc=$(loc)&view=$(view)&subview=D&selyr=$(selyr)&fqtr=$(fqtr)&as400fmm
>=$(as400fmm)>$(V1)</a>
>     </td>
>     <td>
>      %if ($(V2) == "")
>        &nbsp;
>      %else
>        <small>$(V2)</small>
>      %endif
>     </td>
>     <td align=right>$(V3)</td>
>     <td align=right>$(V4)</td>
>     <td align=right>
>        @dtw_subtract($(V4), $(V3), vary)
>
>
>Peter Vidal
>Pall Aeropower Corp.
>SR Programmer Analyst
>WWW.Pall.com
>
>"A good player makes himself look good; a great player makes the team look
>good."
>Author unknown




As an Amazon Associate we earn from qualifying purchases.

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.