Personalized Community is here!
Quickly customize your community to find the content you seek.
Have questions on moving to the cloud? Visit the Dynamics 365 Migration Community today! Microsoft’s extensive network of Dynamics AX and Dynamics CRM experts can help.
2021 Release Wave 2Discover the latest updates and new features releasing from October 2021 through March 2022.
2021 release wave 2 plan
The FastTrack program is designed to help you accelerate your Dynamics 365 deployment with confidence.
FastTrack Program | Finance and Operations TechTalks | Customer Engagement TechTalks | Upcoming TechTalks | All TechTalks
I have a field with fixed length of 20 characters. Field type is Single Line of Text.ABCD1234ABCD1234ABCD
I would like to split this string in 5 different pieces like this ABCD 1234 ABCD 1234 ABCD. One empty space after every 4 characters. This string has no any delimiter, it's only letters and numbers.Could this maybe be achieved by using standard format function?
Thank you for your query.
As you do not have any delimiter, you can split.
Because the length is fixed, you can use MID function in SSRS which is equivalent to SUBSTRING.
Here us the example expression:
=MID(Fields!StringData.Value, 1, 4) & " "
& MID(Fields!StringData.Value, 5, 4) & " "
& MID(Fields!StringData.Value, 9, 4) & " "
& MID(Fields!StringData.Value, 13, 4) & " "
& MID(Fields!StringData.Value, 17, 4)
This shows following output:
You can also use the same expression to show this in separate columns:
If you are using this value multiple times in the report, it is better to do it in the SQL query:
SELECT CONCAT( SUBSTRING('ABCD1234ABCD1234ABCD', 1, 4), ' ',
SUBSTRING('ABCD1234ABCD1234ABCD', 5, 4), ' ',
SUBSTRING('ABCD1234ABCD1234ABCD', 9, 4), ' ',
SUBSTRING('ABCD1234ABCD1234ABCD', 13, 4), ' ',
SUBSTRING('ABCD1234ABCD1234ABCD', 17, 4)
) AS FormattedValue
This is exactly the function that was needed. Thanks a lot Wahaj. I was not aware that this function exist.
Business Applications communities