Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2020 : Report Design
Message Icon Topic: Supress Field in Text Box Post Reply Post New Topic
Author Message
Grifter
Newbie
Newbie


Joined: 02 Jun 2009
Online Status: Offline
Posts: 32
Quote Grifter Replybullet Topic: Supress Field in Text Box
    Posted: 25 Aug 2009 at 3:18am
Hi

I think this is a similar problem to waely's post but I cannot see a solution to my problem there. I have a text field with title, firstname, lastname within a text box. The text box is headed as Name.

Sometimes the person does not have a title inserted so the data can look like this:

Mr John Smith
  Andrew Smith
Mrs Sheila Bongo
  Amanda Brown

So when the title is missing how do I suppress this, that is what do I do in CR to say hide the {Title value} empty space and left align name?

There is a bit on CR help but it does not tell you how to actually do this it just discusses VB code way of doing it but i'm using SQL Server data.

Thanks

G
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 25 Aug 2009 at 7:28am

If I understand you correctly your issue is that the space you typed between the title and fname is the issue.

Instead of using a text box use a formula field to add the items together conditionally.
{table.Title} +
(if isnull({table.Title}) or {table.Title}="" then "" else " ") +
{table.Fname} + " "
{table.Lname}
 
IP IP Logged
Grifter
Newbie
Newbie


Joined: 02 Jun 2009
Online Status: Offline
Posts: 32
Quote Grifter Replybullet Posted: 25 Aug 2009 at 8:28am
Ok will give that a go.

G
IP IP Logged
Post Reply Post New Topic
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



This page was generated in 0.031 seconds.