<p>Hello,</p><p> </p><p>Here is my simple problem :</p><p> </p><p>I want to be able to use a regexp and a replace in the script part of a dataset (beforeOpen) such as :</p><pre class="_prettyXprint">id = id.replace(/null/g,"0");</pre><p>This replace totaly works in a computed column for instance but not in the beforeOpen.</p><p> </p><p>I tried something like that :</p><pre class="_prettyXprint">var reg=new RegExp("1 as test", "g");var SQL = this.queryText;this.queryText=SQL.replace(reg,"2 as test");</pre><div>but it doesn't work and the errors make me feel that in the beforeOpen the replace JS function is limited :</div><div> </div><div><pre class="_prettyXprint">The constructor available are : class java.lang.String replace(char,char) class java.lang.String replace(java.lang.CharSequence,java.lang.CharSequence) (/report/data-sets/oda-data-set[
@id="9571"]/method[
@name="beforeOpen"]#3)</pre><p>Any idea ?</p><p> </p><p>BIRT : 3.7.2</p><p> </p><p>Thanks in advance! </p><p>Etienne.</p></div>