EducationSoftwareStrategy.com
StrategyCommunity

Knowledge Base

Product

Community

Knowledge Base

TopicsBrowse ArticlesDeveloper Zone

Product

Download SoftwareProduct DocumentationSecurity Hub

Education

Tutorial VideosSolution GalleryEducation courses

Community

GuidelinesGrandmastersEvents
x_social-icon_white.svglinkedin_social-icon_white.svg
Strategy logoCommunity

© Strategy Inc. All Rights Reserved.

LegalTerms of UsePrivacy Policy
  1. Home
  2. Topics

KB9031: How to insert a carriage return into an ApplySimple statement


Community Admin

• Strategy


This article describes how to insert a carriage return into an ApplySimple statement

A user may wish to customize their attribute element display so that carriage returns separate lines in one data element. For example, data for an address may be a combination of the street + city + state + zipcode:
 
21100 SilverSmith Road Langley, Virginia 22222
For display purposes, however, users may wish to see this displayed on a report as follows:
 
21100 SilverSmith Road
Langley, Virginia
22222
The lines are separated by a carriage return and this customization is possible by using an ApplySimple statement which uses the database-specific function for a carriage return.
In SQL Server, it would be as follows:
Applysimple("#0 + char(13) + #1 + char(13) + #2 + char(13) + #3" STREET, CITY, STATE, ZIP)
where (13) is the ascii code for a carriage return and the char function converts it into the actual character. Note that use of the SQL Server char function.
In Oracle, it would be as follows. Note the use of the Oracle chr function :
Applysimple("#0 || chr(10) || #1 || chr(10) || #2 || chr(10) || #3" STREET, CITY, STATE, ZIP)
Third Party Software Installation:
WARNING:
The third-party product(s) discussed in this technical note is manufactured by vendors independent of Strategy. Strategy makes no warranty, express, implied or otherwise, regarding this product, including its performance or reliability.


Comment

0 comments

Details

Knowledge Article

Published:

June 8, 2017

Last Updated:

June 8, 2017