I just want to replace a particular text with blank space in RDLC column.
I want to replace .aspx with ""
in every string.
I tried writing
=Replace(Fields!AuditsUserActivity.Value, ".aspx", "")
it works for this kinda lines
Page Applicants.aspx viewed
but not for these kinda lines:
Data added in Inspectors.aspx
i.e. it removed .aspx from those lines in which .aspx appears in in-between but not for those in which .aspx appears at the end of string.
WHY ?
Update:
I used this but not working
=Replace(Fields!AuditsUserActivity.Value, "@"+".aspx", string.Empty)
dont forget add using System.Text.RegularExpressions; namespace
Try this
Like many others have suggested, you should try using a regex expression. Perhaps try copying this exactly:
Use this simple code: