title: Replace function not working in Crystal Reports
body: <p>when i provide string stknummer = "*VU-NR:-93.10xxxxxxxx_2-12-2011*" to this function:</p>
  
  <pre><code>whileprintingrecords;
  
  shared stringvar tstnummer;
  shared stringvar stknummer;
  
  local stringvar tst;
  local stringvar stk;
  local stringvar bc;
  
  tst := tstnummer;
  stk := stknummer;
  
  //why is this not evaluated?
  tst := Replace (tstnummer,":" ,"_" );
  tst := Replace (tstnummer,"." ,"_" );
  tst := Replace (tstnummer,"=" ,"_" );
  tst := Replace (tstnummer,"/" ,"_" );
  tst := Replace (tstnummer,"\" ,"_" );
  tst := Replace (tstnummer,"?" ,"_" );
  tst := Replace (tstnummer,"#" ,"_" );
  tst := Replace (tstnummer,"." ,"_" );
  tst := Replace (tstnummer,"*" ,"_" );
  tst := Replace (tstnummer,"|" ,"_" );
  tst := Replace (tstnummer,"&lt;" ,"_" );
  tst := Replace (tstnummer,"&gt;" ,"_" );
  tst := Replace (tstnummer," " ,"-" );
  
  //and this neither?
  stk := Replace (stknummer,":" ,"_" );
  stk := Replace (stknummer,"." ,"_" );
  stk := Replace (stknummer,"=" ,"_" );
  stk := Replace (stknummer,"/" ,"_" );
  stk := Replace (stknummer,"\" ,"_" );
  stk := Replace (stknummer,"?" ,"_" );
  stk := Replace (stknummer,"#" ,"_" );
  stk := Replace (stknummer,"." ,"_" );
  stk := Replace (stknummer,"*" ,"_" );
  stk := Replace (stknummer,"|" ,"_" );
  stk := Replace (stknummer,"&lt;" ,"_" );
  stk := Replace (stknummer,"&gt;" ,"_" );
  stk := Replace (stknummer," " ,"-" );
  
  
  //select file output format
  if {?barcode_type} = true
  then (if trim(stk) ="" 
       then  
          bc:= "*" + tst + "_" + totext(dateValue({@signdate})) + "*"
       else
          (
          bc:= "*" + stk + "_" + totext(dateValue({@signdate})) + "*");;)
  else bc := "*" + tst + "_" + totext(dateValue({@signdate})) + "*"
  </code></pre>
  
  <p>The result is that no replacements are made (i.e. the : is still there)</p>
  
  <p>when i put    Replace(stk, ":", "_")    in the bottom function like:</p>
  
  <pre><code>//select file output format
  if {?barcode_type} = true
  then (if trim(stk) ="" 
       then  
          bc:= "*" + tst + "_" + totext(dateValue({@signdate})) + "*"
       else
          (
          bc:= "*" + Replace (stk, ":", "_") + "_" + totext(dateValue({@signdate})) + "*");;)
  else bc := "*" + tst + "_" + totext(dateValue({@signdate})) + "*"
  </code></pre>
  
  <p>The replacement is done correctly. </p>
  
  <p>Why are the replacements not done in the first example? </p>
  
  <p>I good put all replacements in the function but that not all too elegant....</p>
  
  <p>THanks</p>