Solved

How to mask the some of the characters in Databasefield - Crystal Reports

Posted on 2013-01-14
5
402 Views
Last Modified: 2013-01-25
Hi,
I have a Database field in the Crystal report. It can be 16 to 20 characters length. I want to mask
all the characters with X except last four characters.

It can be ex:xxxxxxxxxxxx1234 or xxxxxxxxxxxxxxx3456

How to do this in Crystal 11.

Thanks
0
Comment
Question by:KavyaVS
  • 2
  • 2
5 Comments
 
LVL 77

Assisted Solution

by:peter57r
peter57r earned 167 total points
ID: 38776448
Use a formula field...

if length({table.field})=20 then
"xxxxxxxxxxxxxxxx" & right({table.field},4)
else
"xxxxxxxxxxxx" & right({table.field},4)
0
 
LVL 100

Assisted Solution

by:mlmcc
mlmcc earned 333 total points
ID: 38776473
Since it can be 16 TO 20 in length try

Right("xxxxxxxxxxxxxxxx" & right({table.field},4),Length({table.field}))

mlmcc
0
 

Author Comment

by:KavyaVS
ID: 38778559
Hi mlmcc,
It is working.But I want to know how it is working.
Right("xxxxxxxxxxxxxxxx" & right({table.field},4),Length({table.field}))


Thanks
0
 
LVL 100

Accepted Solution

by:
mlmcc earned 333 total points
ID: 38779389
Not sure what you mean by how.

The formula adds the 4 characters you want to a string of 16 x's producing a 20 character string with the left 16 masked as x
    xxxxxxxxxxxxxxxx1234
It then takes the right substring of the appropriate length for display.

Peter's formula will work, he limited it to 16 and 20 character lengths.

mlmcc
0
 

Author Closing Comment

by:KavyaVS
ID: 38818807
Thanks.
0

Featured Post

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Hot fix for .Net Crystal Reports 10.2.3600.0 to fix problems with sub reports running on 64 bit operating systems ISSUE: Reports which contain subreports fail with error "Missing Parameter Value" DEPLOYMENT SERVER OS: Windows 2008 with 64 bi…
There have always been a lot of questions related to when Crystal Reports evaluates report components (such as formulas, summaries, cross-tabs, charts, to name a few examples). Crystal Reports uses a two-pass reporting process to provide greater …
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

706 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now