Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: Placement of a Care-Of line Post Reply Post New Topic
Author Message
JeffMorris
Newbie
Newbie


Joined: 22 Mar 2013
Online Status: Offline
Posts: 2
Quote JeffMorris Replybullet Topic: Placement of a Care-Of line
     Posted: 25 Mar 2013 at 3:24am

Hi all.

I'm a newbie to Crystal Reports and I'm alergic to anything that rhymes with "ogramming" so clearly I'm lost.

I'm trying to figure out how to put the right spacing in a carriage return between a string of two fields (a customer name and a "care-of" contact name). The problem I'm having is two-fold.

First, I can't seem to get the care-of string to NOT show up when there isn't a second line to print. (See screenshot)

 

Second, the spacing is horrible. What needs to happen is that the "Cynthia Karnes" string needs to be just above the "2 Lakefiew Cir" string if there is no "care-of" contact name. (Whether it prints or not is determined by another field being either a "0" or a "1.") And if there IS a "care-of" contact name, then the "Cynthia Karnes" string should move up a line to make room for the "care-of" contact name.

This is what I've got in the formula right now:

{UM_CustomerName_VIEW.CustomerName} + chr(13) + ("c/o " + {CSM_Mailing_Address.Contact})  

When you're done laughing I would appreciate any help you might offer.

Thanks.

-Jeff

 

 



Edited by JeffMorris - 25 Mar 2013 at 3:25am
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 25 Mar 2013 at 4:01am
{UM_CustomerName_VIEW.CustomerName} +
chr(13) +
(if trim({CSM_Mailing_Address.Contact}) = "" then "" else "c/o " + {CSM_Mailing_Address.Contact} + chr(13))  +
{CSM_Mailing_Address.Street} +  etc.
IP IP Logged
JeffMorris
Newbie
Newbie


Joined: 22 Mar 2013
Online Status: Offline
Posts: 2
Quote JeffMorris Replybullet Posted: 25 Mar 2013 at 4:36am
Thanks, DBlank.
 
With a ~little~ editing* it works perfectly.
 
Give yourself a raise and have a good Irish stout!
 
*Apparently, Crystal doesn't like field names with spaces so I had to switch from using a view to determine printability to the table that the view is based on.
 
 
IP IP Logged
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum