Solved

Address Fields - and No Data

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

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

I hate sub reports and always consider them the last resort in any reporting solution.  The negative effect on performance and maintainability is just not worth the easy ride they give the report writer.  Nine times out of ten reporting requirements…
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…
This video discusses moving either the default database or any database to a new volume.
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

743 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

15 Experts available now in Live!

Get 1:1 Help Now