Project: Birt
Bug 217563 Offer ability to trim strings for filtering
Reported: 2008-02-02 18:53:00 | Status: resolved fixed

Build ID: 3.3.1 Birt:Eclipse BIRT Designer Version 2.2.1.r22a_v20071101 Build &lt;2.2.1.v20071101-1439 Steps To Reproduce: 1. Use a dataset with a CHAR field ending with spaces 2. Make a dynamic report parameter out of this 3. right trim this report parameter This will not work. More information: The rightTrim function is initialized in the initialiaze step: function rightTrim(sString) { while (sString.substring(sString.length-1, sString.length) == " ") { sString = sString.substring(0,sString.length-1); } return sString; } reportContext.setPersistentGlobalVariable("rightTrim",rightTrim); When i use a dynamic field with: rightTrim(params["customer"])+"$" there are spaces between the "$" and the param. This happens if the SQL returns a field with appended spaces. This occurs if a char 10 field is not completely filled. If i use rightTrim(params["customer"]+"")+"$" Then there is some kind of string conversion and the righTrim works.

Files changed in fix:
core/org.eclipse.birt.core.tests/test/org/eclipse/birt/core/script/bre/BirtCompTest.java