Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Compress address by removing blank address lines 2

Status
Not open for further replies.

InKansas

Programmer
Dec 9, 2003
3
US
Does anyone have an example of a Crystal formula for "compressing" a mailing address by removing blank address lines? Thanks much!
 
Using multiple Details sections...

Example:
DetailsA DisplayName
DetailsB Address1
DetailsC Address2
DetailsD City, State Zip

If you want to hide a blank Address2 line, go to Format>Section, click on DetailsC and check the Suppress Blank Section flag.

-dave
 
A somewhat simpler approach is to drop all these elements (new line for each) into a text object placed on the report layout.

Then, simply format the text object with the checkbox option of: "Suppress Embedded Field Blank Lines".

Cheers,
- Ido

CUT, Visual CUT, and DataLink Viewer:
view, e-mail, export, burst, distribute, and schedule Crystal Reports.
 
Good call, Ido. But what if one of the fields is null?

-dave
 
Answered my own question. I can't believe I'd never seen that before. Thanks, Ido!
 
Thanks to everyone who replied to my Crystal question about compressing a mailing address by removing blank address lines. I followed IdoMillet's advice and placed all of the address fields (new line for each field) into a new text object and then turned on the "Suppress Embedded Field Blank Lines" checkbox. Works like a charm! Thanks Ido.

InKansas
 
Thanks Ido!

This is a great place to come for Crystal answers.

Thanks,
Mary
 
This is a very helpful idea - I thought it would work for my issue, but I am still having problems:
My report has several lines of output from formulas showing duplicate information that I only want to appear once. So when I "Suppress if Duplicated" I get only the output I want, but then I have several blank lines between this and the next line (from where i supressed the duplicates). So I wanted to get rid of this white space! I tried the idea above - dropped them into text objects and checked both "Suppress if Duplicated" and "Suppress Embedded Field Blank Lines" - but now I have the duplicates back! I even tried formatting the formula field before I dropped it into the text field (with both the text field formatted and not formatted as well). Any idea why this is happening? - i can't use multiple details sections so I was really hoping this would work...please help!
 
Hi

I am new to Crystal Reports
I need to do the same as InKansas.
I tried dragging existing fields to the text object but the blank line still shows. I suspect the fields are not embedded in the text object.

How do I embed them?

Thanking you all in advance
Denis
 
I appreciate your reply.

I omitted to mention that I am working with the CR that is packaged with .NET studio.

Tried drag 'n drop but no change in cursor!

To clarify :-

I tried to drag IFieldObject into ITextObject


Denis
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top