title: Formatting strings in a text field in Crystal Reports XI
body: <p>Good morning!</p>
  
  <p>I'm hoping someone can help me with what is probably a simple question but I just cant get things to work the way I would like.  I am currently working with a report that has a "catch-all" text field.  In this field the user can input anything they want, and on occasion, will input information in a column format (ex. 1.1).  This field allows carriage returns which are used to create "rows" in this field.  The problem is that the user wants the "columns" in this field to line up on the report without having to count spaces between the columns when the information is entered (ex. 1.2).  The problem is that even when this type of information is entered there is no set protocol or formatting guidelines.  There may be multiple "subtitles", rows, rows separated by subtitles, etc.. The carriage return (Chr(10)) at the end of each line (or beginning of each new line) is the only thing that can be relied on consistantly.</p>
  
  <p>I am currently trying to seperate each individual row, format each as desired, and put it back together like so:</p>
  
  <pre><code>    Dim output As String
      Dim sections as String
      Dim returnCount as Int 
      Dim leftText as String
      Dim rightText as String
      Dim sectionTogether as String
      Dim totalText as String
      Dim textLength as Int
  
      output = {table.textfield}
  
      sections = ExtractString(output, Chr(10), Chr(10))
  
      If Instr(sections,"  ") &gt; 0 Then
        leftText = Left(sections, Instr(sections, "  "))
        textLength = Length(Left(sections, Instr(sections, "  "))
        rightText = Right(sections, Instr(sections, "  "))
        Replace(sections,"  "," ")
        sectionTogether = rightText + (Space(20) - (textLength - 3)) + leftText
        totalText = totalText + sectionTogether
        formula = totalText
      else
        formula = output
  </code></pre>
  
  <p>This is the gist of what I'm trying to do.  A couple of notes:
  1) I know I am missing a loop of some kind to format every section but I dont know how to set that up in crystal
  2) I have VB programming experience, but I am noob in crystal and its limited tools so I feel hamstringed and I'm having trouble finding the methods and tools I would use in Visual Studio 
  3) My syntax may also be off in a few places because I am still learning how to set this up and I REALLY miss a debugger.</p>
  
  <p>I hope someone can help me, I have been researching for over a week and it feels like I'm just beating my head against a wall.</p>
  
  <p>Thank you in advance.</p>
  
  <pre><code>The output examples
  ex. 1.1
  "Your current charges are:
  Jan          12.89
  Feb         117.44
  Mar          15.02
  Apr        4.17"
  
  ex. 1.2
  "Your current charges are:
  Jan                       12.89
  Feb                      117.44
  Mar                       15.02
  Apr                        4.17"
  </code></pre>