Results 1 to 3 of 3

Thread: Crystal Report 10 Formula not working?

Threaded View

  1. #1

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

    Crystal Report 10 Formula not working?

    I'm using CR 10. I have a report that has a simple formula that formats a customers address information. The address isn't showing up on the report. The problem is that all the records have data in them except for some of the Address2 and Address3 data fields. I've tried dropping the individual Contact fields onto the report and it works fine. Here is the formula below.

    Code:
    Dim strformula as String
    
    if {AR_Customer.CustomerName} <> "" then 
        strformula = {AR_Customer.CustomerName} & chr(13) + chr(10)
    end if
    
    if {AR_Customer.AddressLine1} <> "" then 
        strformula = strformula & {AR_Customer.AddressLine1} & chr(13) + chr(10)
    end if
    
    if {AR_Customer.AddressLine2} <> "" then 
        strformula = strformula & {AR_Customer.AddressLine2} & chr(13) + chr(10)
    end if
    
    if {AR_Customer.AddressLine3} <> "" then 
        strformula = strformula & {AR_Customer.AddressLine3} & chr(13) + chr(10)
    end if
    
    if {AR_Customer.City} <> "" then
        strformula = strformula & {AR_Customer.City} & ", " 
    end if
    
    if {AR_Customer.State} <> "" then
        strformula = strformula & {AR_Customer.State} & "  "
    end if
    
    if {AR_Customer.ZipCode} <> "" then
        strformula = strformula & {AR_Customer.ZipCode}
    end if
    
    formula = strformula
    What am I doing wrong. I'm using Basic Syntax for all my formulas.

    Thanks,
    Last edited by blakemckenna; May 1st, 2009 at 10:34 AM.
    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