Results 1 to 14 of 14

Thread: [RESOLVED] Formula working only on some records?

Hybrid View

  1. #1
    Super Moderator si_the_geek's Avatar
    Join Date
    Jul 2002
    Location
    Bristol, UK
    Posts
    41,974

    Re: Formula working only on some records?

    In cases like that the problem is usually due to some kind of difference in the data.. is there anything at all in those rows that are different to other rows?

    It's been a long time since I used Crystal, but I remember that you can set parts of the report to "hide" based on fields/formulas.. have you perhaps got anything like that set up in this report?

  2. #2

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

    Re: Formula working only on some records?

    No, I've checked all that. The records in question are being read, but it's not showing ALL the data that should show on the report. I ran a test and put a statement in my Formulas where it WILL display a value and when I ran the report it didn't show up, which tells me the formula didn't get executed. So, now my question is....what would cause a formula NOT to execute for specific records only? I've included my formulas for review!

    Code:
    REM Formula 1
    
    WhilePrintingRecords
    
    Global blnConsigneeXref as Boolean
    
    If {tblConsignees.AdventCustomerID} <> "" Then
        If {tblConsignees.AdventCustLocNumber} > "" Then
            blnConsigneeXref = true
            Formula = {tblBatchDetail.destCustNumber} & "/(" & {tblConsignees.AdventCustomerID} & "-" & {tblConsignees.AdventCustLocNumber} & ")"
        Else
            blnConsigneeXref = true
            Formula = {tblBatchDetail.destCustNumber} & "/(" & {tblConsignees.AdventCustomerID} & ")"
        End If
    Else
        blnConsigneeXref = false
        Formula = {tblBatchDetail.destCustNumber} & "/(Unk)"
    End If
    
    
    REM Formula 2
    
    WhilePrintingRecords
    
    Global blnCarrierXref as Boolean
    
    If {tblBatchDetail.carrierSCAC} <> "" Then
        If {tblBatchDetail.fein} > "" Then
            Formula = {tblBatchDetail.carrierSCAC} & "/" & {tblBatchDetail.fein}
            If {tblCarriers.AdventCarrierCD} > "" Then
                blnCarrierXref = true
                Formula = {tblBatchDetail.carrierSCAC} & "/" & {tblBatchDetail.fein} & "/(" & {tblCarriers.AdventCarrierCD} & ")"
            Else
                blnCarrierXref = true
                Formula = {tblBatchDetail.carrierSCAC} & "/" & {tblBatchDetail.fein} & "/Unk)"
            End If
        Else
            blnCarrierXref = false
            Formula = {tblBatchDetail.carrierSCAC} & "/(Unk)"
        End If
    Else
        Formula = "Unkown"
    End If
    
    
    REM Formula 3
    
    WhilePrintingRecords
    
    Global blnProductXref as Boolean
    
    If {tblProducts.AdventProductCD} <> "" Then
        blnProductXref = true
        Formula = {tblBatchDetail.prodCode} & "/(" & {tblProducts.AdventProductCD} & ")"
    Else
        blnProductXref = false
        Formula = {tblBatchDetail.prodCode} & "/(Unk)"
    End If
    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