我创建了一个页面并添加了一个交互式报告来显示视图数据
CREATE OR REPLACE VIEW FAC_FILE_MANAGEMENT_VIEW AS
SELECT FAC_FILE.NAME as FILE_NAME, FAC_NHAN_VIEN.USERNAME as USERNAME,
FAC_FILE_MANAGEMENT.FAC_MONTH as FAC_MONTH, FAC_FILE_MANAGEMENT.FAC_YEAR as FAC_YEAR, FAC_FILE_UPLOAD.LAST_UPDATED as LAST_UPDATED,
CASE IS_COMPLETED
WHEN 0 THEN 'Not Upload'
WHEN 1 THEN 'Completed'
END as IS_COMPLETED
FROM FAC_FILE_MANAGEMENT left join FAC_FILE on FAC_FILE_MANAGEMENT.FILE_ID = FAC_FILE.ID
left join FAC_FILE_UPLOAD on FAC_FILE_MANAGEMENT.FILE_UPLOAD_ID = FAC_FILE_UPLOAD.ID
left join FAC_NHAN_VIEN on FAC_FILE_MANAGEMENT.UPLOADED_BY = FAC_NHAN_VIEN.ID;
现在,我想创建新的自定义列nam'查看详细信息'。此列是基于IS_COMPLETED
值的链接如何在交互式报告中添加自定义列?
答案 0 :(得分:1)
在报告查询中添加列,例如:
struct s { int a; };
struct s; // does nothing (s already defined in this scope)
void g() {
struct s; // forward declaration of a new, local struct "s"
// this hides global struct s until the end of this block
s* p; // pointer to local struct s
struct s { char* p; }; // definitions of the local struct s
}
这会在报告中添加新列。
现在转到,DECODE(IS_COMPLETED,'Y','<a href="f?p=&APP_ID.:1:&SESSION.::::P1_FILE_NAME:' || FAC_FILE.NAME ||'">View Detail</a>','N','') AS 'Detail'
标签,然后修改Report Attributes
列。
并将Detail
更改为Display As
。
此外,您需要在交互式报告中选择要从输出中显示的列。
答案 1 :(得分:0)
如果你只是像这样添加NULL
,那就容易多了SELECT NULL as View_Detail, <insert other columns>
FROM TABLE