Removing Crystal blank or null fields address info

Posted on 2007-07-30
Last Modified: 2008-01-09
How do you remove blank or null fields from report formats (Crystal 9) in the report output versus seeing a blank line in your report? I'm creating a report format based on residential and business adrress'. Some addresses contain more than one line for address info. (ex: John Hancock Tower, 200 Clarendon St, Boston, MA. 02120). If the line containing "John Hancock Tower" is blank or null, how can I remove the space it gives me in the report output??
Question by:bceagles
    LVL 17

    Expert Comment

    There are a few different ways...but try this first.

    Go to SELECT EXPERT....choose your field....then ....choose formula.

    In the formula type:

    NOT ISNULL({yourtable.field})

    Then close with OK....Crystal will pull in ALL fields that are NOT NULL.

    LVL 17

    Expert Comment

    You can also do this by using hardcoded SQL SCRIPT as your datasource...


    You can use CONDITIONAL PRINTING in your report to only allow items that are NOT NULL.


    LVL 5

    Accepted Solution

    I think the problem here is what happens to the space allocated to the field that turned up Null.
    One possible solution for that is as follows:

    In order to remove the empty space, place each address line in a different sub-section (ex GH1a, GH1b, GH1c ....etc...).
    Then conditionally display or hide the (sub)section based on whether the field is null or not.
    ex: Place Address Line 1 in GH1b, Address Line 2 in GH1c and put conditional suppress not on the field but on the entire subsection section. So for GH1b, the conditional suppress would be
    and for GH1c: ISNULL({databaseTable.Address2})

    This will remove empty spaces.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Find Ransomware Secrets With All-Source Analysis

    Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

    Entering a date in Microsoft Access can be tricky. A typo can cause month and day to be shuffled, entering the day only causes an error, as does entering, say, day 31 in June. This article shows how an inputmask supported by code can help the user a…
    This article explains all about SQL Server Piecemeal Restore with examples in step by step manner.
    Video by: Steve
    Using examples as well as descriptions, step through each of the common simple join types, explaining differences in syntax, differences in expected outputs and showing how the queries run along with the actual outputs based upon a simple set of dem…
    Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

    759 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    7 Experts available now in Live!

    Get 1:1 Help Now