Solved

Address Fields - and No Data

Posted on 2011-09-27
5
235 Views
Last Modified: 2012-05-12
Here's a quick question - when adding an address block to a report,

Address line 1, Addressline 2, Address Line 3, City, Province/State, Postal Code/ Zip
if any of these fields does not contain data,then none of the fields show up.  I have read some comments regarding this but am wondering - how do I solve this?  

Any help would be appreciated,

Thanks in advance,
cms
0
Comment
Question by:rporter45
5 Comments
 
LVL 19

Assisted Solution

by:GJParker
GJParker earned 83 total points
ID: 36709992
Sounds like you have null values in one or more fields.

One way to get around this is to inserta  text field on to the report and then drag each of the address fields into the text box (you can add carriage returns if you want hem on multiple lines.

Then right click on the text field -> common tab -> check 'Suppress Embedded Field Blank Lines'

HTH
0
 
LVL 100

Assisted Solution

by:mlmcc
mlmcc earned 83 total points
ID: 36710846
Another method is to test for NULL in the formula that builds the address

Local StringVar strAddress;
If Not IsNull({Table.Address1}) then
    strAddress := {Table.Addres1};

If Not IsNull({Table.Address2}) then
    If strAddress = "" then
        strAddress := {Table.Address2};
    Else
        strAddress := strAddress  & chr(13) & {Table.Address2};

If Not IsNull({Table.Address3}) then
    If strAddress = "" then
        strAddress := {Table.Address3};
    Else
        strAddress := strAddress  & chr(13) & {Table.Address3};

Similarly for city, state, and zip except don't add the chr(13)

mlmcc
0
 

Author Comment

by:rporter45
ID: 36711081
Thanks to you both for your responses - I have another direction at the time but will be sure to follow up within a day or so,
cms
0
 
LVL 35

Accepted Solution

by:
James0628 earned 84 total points
ID: 36718129
My first question would be, do you just have those address fields in separate fields on the report, or are you using a formula to combine them into one field?

 If they're just separate fields on the report, then the contents of one field shouldn't affect the others, unless you're doing some check, like a record selection or section suppression, that's based on that field.

 If you're using a formula to combine the fields, then nulls may very well be the problem.  Personally, I would handle it by going to File > "Report Options" and checking the "Convert Database NULL Values to Default" option.  Then nulls shouldn't be an issue for that formula, or most any other formula in the report except for the record selection formula.

 James
0
 

Author Closing Comment

by:rporter45
ID: 36903053
Sorry for the delay in response - all were fantastic ideas to provide a solution to this issue that has been haunting my reports for quite a while now.

All have been provided points as each question provides different insight - much appreciated!

have a great day,
cms
0

Featured Post

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

There have always been a lot of questions related to when Crystal Reports evaluates report components (such as formulas, summaries, cross-tabs, charts, to name a few examples). Crystal Reports uses a two-pass reporting process to provide greater …
Hello everyone, Hope you find this as helpful as we did. We have on the company I work for an application built in Delphi V with Crystal Reports 8. We all know that Crystal & Delphi can be temperamental sometimes and the worst thing is, nearly…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

749 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