Results 1 to 4 of 4

Thread: CR 10.2 - Error in formula???

  1. #1

    Thread Starter
    PowerPoster
    Join Date
    Jan 2004
    Location
    Southern California
    Posts
    5,034

    CR 10.2 - Error in formula???

    I have a formula in which I'm getting the following error

    "A field is required here"

    on the highlighted code.

    Code:
    Dim dblDifference as Double
    
    dblDifference = CDbl({@Difference})
    
    formula = Sum(dblDifference)
    Blake

  2. #2

    Thread Starter
    PowerPoster
    Join Date
    Jan 2004
    Location
    Southern California
    Posts
    5,034

    Re: CR 10.2 - Error in formula???

    Anyone have an idea what's causing this?

    thanks,
    Blake

  3. #3
    PowerPoster
    Join Date
    Oct 2002
    Location
    British Columbia
    Posts
    9,758

    Re: CR 10.2 - Error in formula???

    Think about it.

    If @Difference were = 1
    dblDifference would = 1
    Sum(dblDifference) would also = 1, so what is the point.

    If you are just trying to Sum the @Difference formula.

    Formula = Sum(CDBL({@Difference}))

    The above still may cause an error depending on the actual @Difference formula.

  4. #4

    Thread Starter
    PowerPoster
    Join Date
    Jan 2004
    Location
    Southern California
    Posts
    5,034

    Re: CR 10.2 - Error in formula???

    I already tried your suggestion Bruce and it gave me the same error msg. But here is the formula for @Difference:

    Code:
    Sum ({tblReport.invoicedAmt}, {tblReport.custNO}) - Sum ({tblReport.advProdTotCost}, {tblReport.custNO})
    Both tblReport.invoicedAmt and tblReport.advProdTotCost are defined as Integers.
    Last edited by blakemckenna; May 24th, 2007 at 05:41 PM.
    Blake

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width