• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 400
  • Last Modified:

Remaining text does not appear to be part of the formula

i am getting that error for this formula:

{Command.ORDER_ID} = {?OrderID}

if {?LineNo} = ''
then {Command.Line_no} like '%'
else {Command.Line_no} = {?LineNo}

what i am trying to do is to avoid the report breaking when the parameter line no is not entered by using a wild card as its value.

order id is always required.
0
metropia
Asked:
metropia
  • 3
  • 2
1 Solution
 
mlmccCommented:
Try this

{Command.ORDER_ID} = {?OrderID}
AND
if {?LineNo} = ''
then {Command.Line_no} like '%'
else {Command.Line_no} = {?LineNo}

mlmcc

0
 
metropiaAuthor Commented:
Thank you.

that took away the error, but left me with a new one.
LineNo is a numeric field/ column. The formula is complining about this line: if {?LineNo} = ''

"A number is required here"

0
 
metropiaAuthor Commented:
i changed it to:

if {?LineNo} <= 0

and now it complains about the following line: then {Command.Line_no} like '%'

"a string is required here"

shoot!

0
 
metropiaAuthor Commented:
how can a wildcard be used for a numeric correctly?
0
 
mlmccCommented:
You can't use a wildcard with a number data type.  If it is a string that happens to be a number then it will work

{Command.ORDER_ID} = {?OrderID}
AND
if {?LineNo} < 0 then
    True
else
    {Command.Line_no} = {?LineNo}

mlmcc


0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now