Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Hide part of content Post Reply Post New Topic
Page  of 2 Next >>
Author Message
Wosp
Groupie
Groupie
Avatar

Joined: 05 Sep 2012
Location: Sweden
Online Status: Offline
Posts: 45
Quote Wosp Replybullet Topic: Hide part of content
     Posted: 28 Aug 2013 at 7:47pm

Hi!

I got report containing contact information and on the email field it could look like this:

one@example.com;same@old.com
two@example.com;same@old.com
three@example.com
four@example.com;same@old.com
five@example.com

I would like to hide all the same@old.com?

IP IP Logged
praveeng
Senior Member
Senior Member
Avatar

Joined: 11 Jul 2011
Online Status: Offline
Posts: 165
Quote praveeng Replybullet Posted: 29 Aug 2013 at 2:50am

Hi,

The follwing logic may help you.
Create a formula in the Crystal Report designer with below logic

Replace({Email_database_field},";same@old.com","")

Remove the E-mail field from the report and place the above fomrula in the report.
Right click on the Formula field > select Format field > Select Hyperlink tab
then select "Current E-mail Field Value"
Then Click on OK

--Praveen G

Praveen Guntuka,
praveen_guntuka@yahoo.com
IP IP Logged
Wosp
Groupie
Groupie
Avatar

Joined: 05 Sep 2012
Location: Sweden
Online Status: Offline
Posts: 45
Quote Wosp Replybullet Posted: 29 Aug 2013 at 3:57am

Great success! worked perfectly...

Thank you for your invaluable support!
IP IP Logged
Wosp
Groupie
Groupie
Avatar

Joined: 05 Sep 2012
Location: Sweden
Online Status: Offline
Posts: 45
Quote Wosp Replybullet Posted: 29 Aug 2013 at 10:08pm
Originally posted by Wosp

Great success! worked perfectly...

Thank you for your invaluable support!
 
A follow up question, i noticed that we have one more email to hide. But how do i insert one more in the formula, if its possible?

Replace({Email_database_field},";same@old.com","")

IP IP Logged
praveeng
Senior Member
Senior Member
Avatar

Joined: 11 Jul 2011
Online Status: Offline
Posts: 165
Quote praveeng Replybullet Posted: 30 Aug 2013 at 2:01am

As per my understanding you want to hide the emails which are having some other text(or email ids)

IF yes, then try with below logic,
Replace({Email_database_field},";same@old.com","")
or
Replace({Email_database_field},"Some text","")
 
Or if you are requirment is diffrent then please update the post with some test data and your requiremetnt. Then we can understand clearly.. :)
 
--Praveen G
Praveen Guntuka,
praveen_guntuka@yahoo.com
IP IP Logged
Wosp
Groupie
Groupie
Avatar

Joined: 05 Sep 2012
Location: Sweden
Online Status: Offline
Posts: 45
Quote Wosp Replybullet Posted: 01 Sep 2013 at 7:05pm
Hi again, tryed it today and getting a "boolean is required here" with the first row in formula marked.
 
Replace({LEV.EPOST},";tidxxxxx@xxxxxxx.com","")
or
Replace({LEV.EPOST},";birgitta.xxxxxx@xxxxxxx.com","")
 
IP IP Logged
praveeng
Senior Member
Senior Member
Avatar

Joined: 11 Jul 2011
Online Status: Offline
Posts: 165
Quote praveeng Replybullet Posted: 03 Sep 2013 at 12:43am
in which section you are applying the above formulas..
Are you applying in selection formulas or suppress formulas??
 
Praveen Guntuka,
praveen_guntuka@yahoo.com
IP IP Logged
Wosp
Groupie
Groupie
Avatar

Joined: 05 Sep 2012
Location: Sweden
Online Status: Offline
Posts: 45
Quote Wosp Replybullet Posted: 03 Sep 2013 at 12:59am
Originally posted by praveeng

in which section you are applying the above formulas..
Are you applying in selection formulas or suppress formulas??
 
i made a new formula in field explorer and followed your description in your first answer in this thread, then just added
or
Replace({LEV.EPOST},";birgitta.elfving@xxxxxxxx.com","")
 
 
IP IP Logged
praveeng
Senior Member
Senior Member
Avatar

Joined: 11 Jul 2011
Online Status: Offline
Posts: 165
Quote praveeng Replybullet Posted: 03 Sep 2013 at 2:04am
Hi,
 
If your fields are having separator as ; then we can acheive in another way.
Try with below logic,
Numbervar a:= InStr({Database_Field},";");
If a > 0 then
Left({Database_Field},a-1)
Else
{Database_Field}
 
Try with above code and let me know if it is not working..
 
--Praveen G
 
Praveen Guntuka,
praveen_guntuka@yahoo.com
IP IP Logged
Wosp
Groupie
Groupie
Avatar

Joined: 05 Sep 2012
Location: Sweden
Online Status: Offline
Posts: 45
Quote Wosp Replybullet Posted: 03 Sep 2013 at 2:56am
Amazing, worked like a charm =)
 
can't thank you enough Clap
IP IP Logged
Page  of 2 Next >>
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