- Data Structure
- Networking
- RDBMS
- Operating System
- Java
- MS Excel
- iOS
- HTML
- CSS
- Android
- Python
- C Programming
- C++
- C#
- MongoDB
- MySQL
- Javascript
- PHP
- Physics
- Chemistry
- Biology
- Mathematics
- English
- Economics
- Psychology
- Social Studies
- Fashion Studies
- Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Getting a carriage return of report field in SAP Crystal Report
You can make use of split as below −
// To split the text on carriage
Local Stringvar Array lines: = Split( {table.field}, Chr(20) );
// To return carriage 1 less than the number of lines
Local Numbervar delimiters := Ubound(lines)-1;
Let us see one more example, how to use split to divide a string in different lines.
stringvar array x := split({table.fullname}," "); x[1] stringvar array x := split({table.fullname}," "); if ubound(x) >= 2 then x[2] stringvar array x := split({table.fullname}," "); if ubound(x) >= 3 then x[3]
This will split a string in 3 different lines like
“Mr”
“John”
“Harper”
Advertisements