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 Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Help with suppression of part of string 1

Status
Not open for further replies.

kwirky

MIS
Apr 22, 2010
85
AU
Hello,
I have a report using Crystal Reports XI and I need to be able to supress part of a description.

We are using a tilda (~) to separate what we want to see from what we want suppressed.

So we have a description which says "Please do not leave in the driveway ~ stock valuable"

We want the document to only show "Please do not leave in the driveway".

Can anyone help with a suppression formula?

Many thanks

 
If the field is always like that, then SPLIT would do it. If some are different, you'd need something like
[CODE @DescriptionShown]if ubound(split({your.field},"~")) > 0 then
split({your.field},"~")[1]
else {your.field}[/CODE]

[yinyang] Madawc Williams (East Anglia, UK). Using Crystal 10 & 11.5 with Windows XP [yinyang]
 
can I use this as well in the following situation?

I have the following formula field:

if {LND_PR_CLIENT.CLIENTCODE}= "V"
then (maximum({LND_PR_CLIENT.CLIENT_ID}))& Propercase ({LND_PR_CLIENT.CLIENTNAME})

The only problem is, I do want to make sure what displays is the Client name that was input last (has the maximum Client ID), but I don't actually want the Client ID to display......

I can't just put the {LND_PR_CLIENT.CLIENTCODE}= "V" in the report selection formula either because of data issues in the tables..........

Help please?
 
Your logic is incorrect here. This formula says if the client code for the current record = "V" then show me the last record for the entire report. I think you want to show the name for the most recent record where the client code = "V":

if {LND_PR_CLIENT.CLIENTCODE}= "V" then
{LND_PR_CLIENT.CLIENT_ID} & Propercase {LND_PR_CLIENT.CLIENTNAME}

Right click on and insert a maximum on this formula at the group or report level.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top