词法参数内的绑定参数 oracle reports builder

bind parameter inside a lexical parameter oracle reports builder

有没有办法在像这样的词法参数查询中使用绑定参数?:

select col from tbl where col = :bind_param

注意:上面的代码是一个词法参数的输入

当说 "lexical query" 时,你是指 "lexical parameter" 吗?

如果我没理解错的话,是的 - 您可以通过在 After Parameter Form 触发器 中设置它来做到这一点。 (顺便说一句,那是我设置词法参数值的地方,总是)。

打开 Reports 在线帮助系统并搜索 "lexical"。描述得很好。我相信这就是您要问的:

A lexical reference cannot be used to create additional bind variables after the After Form trigger fires. For example, suppose you have a query like the following (note that the WHERE clause is replaced by a lexical reference):

SELECT ENAME, SAL FROM EMP
  &where_clause

If the value of the where_clause parameter contains a reference to a bind variable, you must specify the value in the After Form trigger or earlier (*LF). You would get an error if you supplied the following value for the parameter in the Before Report trigger:

WHERE SAL = :new_bind

If you supplied this same value in the After Form trigger, the report would run.

(*LF) 现在,这有点矛盾 - "or earlier" 实际上 报告之前的触发器,所以...谨慎对待。正如我所说(我会重复):我在后参数表单中设置词法参数的值。一直工作(对我来说)。