2

I use a string file in SQL to create a report in crystal reports. The problem is that crystal reports is not interpreting the page breaks. Is there a split function that can search through a string and every time Owner no. occurs, split the string into a new record? The string are large,(above 1000 characters). Thanks in advance.

Yuck
  • 49,664
  • 13
  • 105
  • 135
user973671
  • 1,620
  • 6
  • 27
  • 39
  • You don't need to put *SQL 2008* in the title as this is what the tags are for. – Yuck Feb 17 '12 at 20:13
  • Duplicate? See http://stackoverflow.com/questions/2647/split-string-in-sql. – Shawn Steward Feb 17 '12 at 21:46
  • Not answering the SQL question but if it's being displayed as a record in a column in crystal report, did you try "Can grow" option in crystal report to wrap into multiple lines? – lakshminb7 Feb 17 '12 at 22:30

1 Answers1

0

Place in Details section:

//{@block 0}
Local Stringvar CRLF := Chr(10)+Chr(13);

If Instr({table.field}, CRLF) Then
  Split({table.field}, CRLF)[1]
Else
  {table.field}

insert this formula its own Details section; mark section 'suppress when blank' and 'new page before':

//{@block 1}
Local Stringvar CRLF := Chr(10)+Chr(13);

If Instr({table.field}, CRLF) Then
  Split({table.field}, CRLF)[2]
craig
  • 25,664
  • 27
  • 119
  • 205