Solved

Address Fields - and No Data

Posted on 2011-09-27
5
227 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 34

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Crystal Reports: 5 Tests for Top Performance It is complete, your masterpiece report.  Not only does it meet your customer’s expectations, it blows them out the water, all they want is beautifully summarised and displayed in a myriad of ways. …
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…
Migrating to Microsoft Office 365 is becoming increasingly popular for organizations both large and small. If you have made the leap to Microsoft’s cloud platform, you know that you will need to create a corporate email signature for your Office 365…
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…

910 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

24 Experts available now in Live!

Get 1:1 Help Now