Reprot中的五个Trigger说明

Report Trigger

1.1 Which report trigger to use

As a general rule, any processing that will affect the data retrieved by the report should be performed in the Before Parameter Form or After Parameter Form triggers. (These are the two report triggers that fire before anything is parsed or fetched.) Any processing that will not affect the data retrieved by the report can be performed in the other triggers.

翻译:

一般法则,任何能影响报表提取的数据的行为都要在Before Parameter Form和After Parameter Form triggers中执行,(这两个报表触发器将在任何语法分析和数据提取之前。),而其它不能够影响报表提取的数据的行为可以在其它触发器中执行。

1.         Before Report: Fires before the report is executed but after queries are parsed.

Before Report触发器在查询语句解析之后报表执行之前引发。

2.         After Report: Fires after you exit the Previewer, or after report output is sent to a specified destination, such as a file, a printer, or an Oracle Office userid. This trigger can be used to clean up any initial processing that was done, such as deleting tables. Note, however, that this trigger always fires, whether or not your report completed successfully.

After Report触发器将在退出预览器之后或者报表输出到指定的目的如:打印机、Oracle Office用户之后执行。这触发器能够用来清除任何已经完成的初始化行为,例如删除数据表(一般是临时表)。注意,无论你的报表是否能够成功运行,这个触发器总会触发。

3.         Between Pages :Fires before each page of the report is formatted, except the very first page. This trigger can be used for customized page formatting. In the Previewer, this trigger only fires the first time that you go to a page. If you subsequently return to the page, the trigger does not fire again

Between Pages触发器将在除第一页的其它每一页编排之前触发。这触发器能够用来定制报表页的编排。在预览时候,这触发器只在你转到某一页时触发。假如接着你返回到已经预览过的报表页时,触发器不会再触发。Before Parameter Form: Fires before the Runtime Parameter Form is displayed. From this trigger, you can access and change the values of parameters, PL/SQL global variables, and report-level columns. If the

1.         Runtime Parameter Form is suppressed, this trigger still fires. Consequently, you can use this trigger for validation of command line parameters.

Before Parameter Form触发器将在Runtime Parameter Form(运行时刻参数输入表框)显示之前触发。通过这触发器,你能够存取和改变参数、PL/SQl中全局变量和报表级别列的值。假如Runtime Parameter Form被终止,这触发器仍然会触发。因此,你能够用它来验证命令行参数的有效性。

2.         After Parameter Form :Fires after the Runtime Parameter Form is displayed. From this trigger, you can access parameters and check their values. This trigger can also be used to change parameter values or, if an error occurs, return to the Runtime Parameter Form. Columns from the data model are not accessible from this trigger. If the Runtime Parameter Form is suppressed, the After Parameter Form trigger still fires. Consequently, you can use this trigger for validation of command line parameters or other data.

After Parameter Form触发器将在Runtime Parameter Form(运行时刻参数输入表框)显示之后触发。通过这触发器你可以存取和核对参数的值。当错误发生时,这触发器能够改变参数的值并返回给Runtime Parameter Form。Data Model中的列对这触发器是不可见的,

假如Runtime Parameter Form被终止,这触发器仍然会触发。因此,你能够用它来验证命令行参数的有效性。

1.2 Report trigger order of execution(Trigger执行顺序)

The order of events when a report is executed is as follows:

Before Parameter Form trigger is fired.

1.         Runtime Parameter Form appears (if not suppressed).

2.         After Parameter Form trigger is fired (unless the user cancels from the Runtime Parameter Form).

3.         Report is "compiled."

4.         Queries are parsed.

5.         Before Report trigger is fired.

6.         SET TRANSACTION READONLY is executed (if specified via the READONLY argument or setting).

7.         The report is executed and the Between Pages trigger fires for each page except the last one. (Note that data can be fetched at any time while the report is being formatted.) COMMITs can occur during this time due to any of the following—user exit with DDL, SRW.DO_SQL with DDL, or if ONFAILURE=COMMIT, and the report fails.

8.         COMMIT is executed (if READONLY is specified) to end the transaction.

9.         After Report trigger is fired.

10.         COMMIT/ROLLBACK/NOACTION is executed based on what was specified via the ONSUCCESS argument or setting.

1.3 Report trigger restrictions(报表中触发器的一些约定)

1.         If you are sending your report output to the Runtime Previewer or Live Previewer,you should note that some or all of the report triggers may be fired before you see the report output. For example, suppose that you use SRW.MESSAGE to issue a message in the Between Pages trigger when a condition is met. If there are forward references in the report (e.g., a total number of pages displayed before the last page),

Report Builder may have to format ahead to compute the forward references. Hence, even though you have not yet seen a page, it may already have been formatted and the trigger fired.

例如,假如当条件符合时候,你用SRW.MESSAGE在Between Pages Trigger中发布消息。如果报表中有提前引用变量(例如,一总页数在最后页之前显示),Report Builder将事先计算这提前引用变量.因此,即使你没有看到一页报表,但这页报表已经编排了,而且触发器也触发了。

2.         In report triggers, you can use the values of report-level(报表级) columns and parameters. For example, you might need to use the value of a parameter called COUNT1 in a condition (e.g., IF :COUNT1 = 10). Note, though, that you cannot reference any page-dependent columns (i.e., a column with a Reset At of Page) or columns that rely on page-dependent columns.

注意,你不能够引用任何页级列(例如,设置为Reset At of Page的列),和依赖于页级的列。

3.         In the Before and After Parameter Form, and Before and After Report triggers, you can set the values of parameters (e.g., give them a value in an assignment statement,:COUNT1 = 15). In the Before and After Report triggers, you can also set the values of report-level, placeholder columns.

在Before and After Report triggers中,你能够给参数,报表级的占位列赋值。

4.         In the Between Pages trigger, you cannot set the values of any data model objects. Note also that the use of PL/SQL global variables to indirectly set the values of columns or parameters is not recommended. If you do this, you may get unpredictable results.

在Between Pages trigger中你不能对任何Data Model对象赋值。同样要注意用PL/SQL全局变量间接去给列或参数赋值也是不提倡的。如果你那样做的话,你可能取得意想不到的结果。

If you run a report from Report Builder Runtime (i.e., not the

1.         command line or SRW.RUN_REPORT), you should commit database changes you make in the Before Parameter Form, After Parameter Form, and Validation triggers before the report runs. When running in this way, these triggers will share the parent process’ database connection. When the report is actually executed, however, it will establish its own database connection.

2.         A lexical reference cannot be used to create additional bind variables after the After Parameter 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 Parameter Form trigger or earlier. You would get an error if you supplied the following value for the parameter in the Before Report trigger. If you supplied this same value in the After Parameter Form trigger, the report would run.

WHERE SAL =: new_bind

如果Where表达式引用绑定变量,你必须在After Parameter Form trigger中或者更早指定它的值。假如你在Before Report trigger给参数赋下面的值,将报错。

Reprot中的五个Trigger说明

时间: 2024-10-31 22:23:51

Reprot中的五个Trigger说明的相关文章

Java中的五种单例模式实现方法

[代码] Java中的五种单例模式实现方法 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 package s

制作由下向上的滚动字幕,字幕内容要求包含网站超级链接和图片超级链接, 使用鼠标移动事件控制字幕运动和停止。 2、在下拉列表框中设置五种以上颜色,选择颜色后, 滚动字幕背景色改变成相应颜色

<!DOCTYPE html><html>    <head>        <meta charset="UTF-8">        <title></title>    </head>    <!--        时间:2016-12-28        描述:1.制作由下向上的滚动字幕,字幕内容要求包含网站超级链接和图片超级链接,                   使用鼠标移动事件控制

数据库中的五种约束及其添加方法

数据库中的五种约束及其添加方法五大约束1.—-主键约束(Primay Key Coustraint) 唯一性,非空性 2.—-唯一约束 (Unique Counstraint)唯一性,可以空,但只能有一个 3.—-检查约束 (Check Counstraint) 对该列数据的范围.格式的限制(如:年龄.性别等) 4.—-默认约束 (Default Counstraint) 该数据的默认值 5.—-外键约束 (Foreign Key Counstraint) 需要建立两表间的关系并引用主表的列五大

Oracle--数据库中的五种约束

数据库中的五种约束 数据库中的五种约束及其添加方法 五大约束 1.--主键约束(Primay Key Coustraint) 唯一性,非空性 2.--唯一约束 (Unique Counstraint)唯一性,可以空,但只能有一个 3.--检查约束 (Check Counstraint) 对该列数据的范围.格式的限制(如:年龄.性别等) 4.--默认约束 (Default Counstraint) 该数据的默认值 5.--外键约束 (Foreign Key Counstraint) 需要建立两表间

XML中的五个保留字符及实体引用

字符名称 字符 实体引用 和 & & 大于号 >  > 小于号 <  < 单引号 ‘ &apos; 双引号 “ " 在XML文档中,构成元素内容或属性的字符一般用它本身表示,但对于XML中的保留字符如“<”,“>”等就不适用了.在XML文档中如果要使用到保留字符的话就要利用实体引用方式来表示.上表列出了XML中的五个保留字符及实体引用. 例:实体引用实例,文件名exa.xml. <?xml version="1.0&qu

Redis中的五种数据结构

Strings: Lists: Sets: Hashes: Zsets: Redis中的五种数据结构

SQL Server 中的触发器(trigger)

SQL Server 触发器 触发器是一种特殊类型的存储过程,它不同于之前的我们介绍的存储过程.触发器主要是通过事件进行触发被自动调用执行的.而存储过程可以通过存储过程的名称被调用. Ø 什么是触发器 触发器对表进行插入.更新.删除的时候会自动执行的特殊存储过程.触发器一般用在check约束更加复杂的约束上面.触发器和普通的存储过程的区别是:触发器是当对某一个表进行操作.诸如:update.insert.delete这些操作的时候,系统会自动调用执行该表上对应的触发器.SQL Server 20

Unix网络编程中的五种I/O模型_转

转自:Unix网络编程中的的五种I/O模型 下面主要是把unp第六章介绍的五种I/O模型. 1. 阻塞I/O模型 例如UDP函数recvfrom的内核到应用层.应用层到内核的调用过程是这样的:首先把描述符.接受数据缓冲地址.大小传递给内核,但是如果此时 该与该套接口相应的缓冲区没有数据,这个时候就recvfrom就会卡(阻塞)在这里,知道数据到来的时候,再把数据拷贝到应用层,也就是传进来的地址空 间,如果没有数据到来,就会使该函数阻塞在那里,这就叫做阻塞I/O模型,如下图: 2. 非阻塞I/O模

千兆网络中——使用五类线、超五类线和六类线的区别

去年入手了一台Seagate的Central.一直没时间好好研究,直接插上就用了.内网速度一直维持在10M-15M左右.今年618换了款千兆路由器,速度瞬间提升到了50M-70M.线缆用的都是五类,心中就产生疑问:如果换成超五类线或者六类线,性能是不是能再提高点??于是网上搜到一个哥们十分专业的回答,忍不住粘下来跟大家共享: 原帖地址:http://we.poppur.com/thread-1098485-1-1.html 5类线的传输频率标准是100MHz  超5一般是125MHz  6类标准