FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Why it does not work ?
Posts: 723
Joined: Tue Sep 04, 2007 08:45 AM
Why it does not work ?
Posted: Tue Aug 27, 2013 01:56 AM
Guys:

In old Clipper 5.2e & DOS the following report worked flawlessly:
Code (fw): Select all Collapse
LOCAL dDate := CTOD(), bForCond := EVAL({|| nQty := IIF(dDate == DATE(), Qty, FindInvQty (InvNo, Qty, @dDate)), .T.})}
.
.
.
dDate := ... // Date entered by user.
REPORT FORM repname FOR EVAL(bForCond)

// On the report (FRM) there are two columns out of 7:
// Column 4: nQty
// Column 5: nQty * Cost

On FWH, the setting:
Code (fw): Select all Collapse
          COLUMN TITLE 'On Hand'       DATA nQty           PICTURE "999999.99"         SIZE 9
         COLUMN TITLE 'Reorden Point' DATA Reorder        PICTURE "999999.99"         SIZE 9 
         COLUMN TITLE 'Unit Cost'     DATA Cost           PICTURE "999999.99"         SIZE 9 
         COLUMN TITLE 'Total Cost'    DATA ROUND(nQty * Cost,2) ;
                                                          PICTURE "999999.99" TOTAL   SIZE 12
         oRep:bFor   := {|| nQty := IIF(dDate == DATE(), Qty, FindInvQty (InvNo, Qty, @dDate)))}

Software stops with an error on expression: (nQty * Cost)

Thank you
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: Why it does not work ?
Posted: Tue Aug 27, 2013 04:55 AM

ROUND(...) function should have two parameters
Example: ROUND( nQty * Cost, 2 )
But you did not specify the second parameter

Regards



G. N. Rao.

Hyderabad, India
Posts: 723
Joined: Tue Sep 04, 2007 08:45 AM
Re: Why it does not work ?
Posted: Tue Aug 27, 2013 09:01 AM

Rao:

Thanks for your reply, the ROUND parameter is there, I just deleted it by mistake when posting. Take a look at the revised code. Thank you.

Posts: 4840
Joined: Fri Nov 18, 2005 04:52 PM
Re: Why it does not work ?
Posted: Tue Aug 27, 2013 02:55 PM
Software stops with an error on expression: (nQty * Cost)

What is the error?
FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10
Posts: 723
Joined: Tue Sep 04, 2007 08:45 AM
Re: Why it does not work ?
Posted: Tue Aug 27, 2013 05:39 PM

James:

Thank you for your support. The error was an argument error *
Now is working, strange things uh ? Maybe I was a exhausted ... Thank you

Continue the discussion