At 08:57 AM 7/28/2008, Dan Betz wrote:

Slightly off topic, but I am under the impression that one can
capture the value of the DB Calc using GetProperty<componentID>
along with the FLOAT function so that one can use the result of
a DB Calc in another expression. Is this correct?


That is very correct, Dan!

Here's how:

01. Use the GETPROPERTY <CompID> VALUE TextVarDataType to get the
    value of assigned DB label

02. Convert the TextVarDataType to CurrencyDataType

03. Now do what you need to do with the Currency Value

    Example:

    CLEAR VARIABLE vCustInvoiceTxt, vCustInvoiceTot
    SET VARIABLE vCustInvoiceTxt TEXT = NULL
    SET VARIABLE vCustInvoiceTot CURRENCY = 00.00
    GETPROPERTY CustomerInvoiceTotal VALUE vCustInvoiceTxt
    SET VARIABLE vCustInvoiceTot = (FLOAT(.vCustInvoiceTxt))

    That should give you the results you need.

    Here's a sample report that explains it all.

    http://www.rbase.com/rbg76/reports/SalesAnalysis.pdf

A sample application to demonstrate the use of such feature is
also available on 2008 SAT Sample Applications.

2008 SAT Sample Applications: http://www.rupdates.com/SAT2008/

Folder: \CapturingDBCalcResultsAsVariablesInReports
Database: DBCalc
Report: SalesAnalysis (Sales Analysis by Customer)

Very Best R:egards,

Razzak.


Reply via email to