5
 Query Model Configuration Manual Step 1. Create Database_LINK  Log in database with account sys.  Create database link as below shows SQL  -- Create database link create public database link LINK_TT connect to eoms identified by eoms using '(DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = 10.16.1.21)(PORT = 1521)) ) (CONNECT_DAT A = (SID = courser) (SERVER = DEDICATED) ) )'; Step 2. Create Procedure  Log in database with account ureport_ad.  Create one procedure to query report data, the naming rule should be p_{system anme}_{report name}, p_tt_ttstatus e.g.  Atten tion: 1. The procedure must has one variable witch the type types.ref_cursor . This variable is used to output the query result. The Type of input variable is no limited. 2. In the procedure, when you need to query other SID data, must add @ DB-Link name of the destination database after the name of table or view. Below mentioned for example  

U-Report - Query Model Manual-En

Embed Size (px)

Citation preview

Page 1: U-Report - Query Model Manual-En

7/28/2019 U-Report - Query Model Manual-En

http://slidepdf.com/reader/full/u-report-query-model-manual-en 1/4

 

Query Model Configuration Manual

Step 1.  Create Database_LINK 

  Log in database with account sys.

  Create database link as below shows SQL: 

-- Create database link

create public database link LINK_TT

connect to eoms identified by eoms

using '(DESCRIPTION =

(ADDRESS_LIST =

(ADDRESS = (PROTOCOL = TCP)(HOST = 10.16.1.21)(PORT = 1521)))

(CONNECT_DATA =

(SID = courser)

(SERVER = DEDICATED)

)

)';

Step 2.  Create Procedure

  Log in database with account ureport_ad.

  Create one procedure to query report data, the naming rule should be p_{system

anme}_{report name}, p_tt_ttstatus e.g.

 Attention:

1.  The procedure must has one variable witch the type

“types.ref_cursor”. This variable is used to output the query

result. The Type of input variable is no limited.

2.  In the procedure, when you need to query other SID data,

must add “@”DB-Link name of the destination database

after the name of table or view.

Below mentioned for example: 

Page 2: U-Report - Query Model Manual-En

7/28/2019 U-Report - Query Model Manual-En

http://slidepdf.com/reader/full/u-report-query-model-manual-en 2/4

 

Step 3.  Configure the XML for query condition page

  Flow the path of $PM4H_APP/conf/web-xml/query, create one new file named

“ProcedureName.xml”. This XML file contains all the parameters of report’s

condition widget.

The description of each widget:

PPF配置标签说明V01.xlsx

 

After the XML file configured, the query page will look like this:

Simple for query page XML file

 Attention:

1.  The configuration XML file is used to transfer the input

variable, so the id of each widget must as same as the

Procedure input variable.

Page 3: U-Report - Query Model Manual-En

7/28/2019 U-Report - Query Model Manual-En

http://slidepdf.com/reader/full/u-report-query-model-manual-en 3/4

 

Step 4.  Configure the XML for Report display style

  Fallow the path $PM4H_APP/conf/report_format, create one new file

named ”ProcedureName.fm” (actually it is still a XML file), This file is used to

control the report Elements and Data style.

Description of the elements

报表格式format配置标签说明V0.1.xl

 

After configuration, the report will look like this:

Simple for the report data page

Step 5.  Declare the Query Model in DB

  Log in database with the account ureport_ad.

  Input one record in the table ALY_TEMPLATEMODEL.

Comment of the table “ALY_TEMPLATEMODEL”.

Column name Comments

TEMPLATEMODELID Modelid, it must as same as the procedure name,

and should be small character.TEMPLATEMODELNAME Model name.

TEMPLATEMODELPAGE Mapping the Query page and query XML file

page.report.querytemplatemodelaction.modelid.

TEMPLATEMODELFUNCTION Transact class name. Now only support

com.inspur.ureport.rqe.adapter.ProcedureAdapter

ENABLE 1-Enable, 0-Unenale

DESCRIPTION Description, will not display in system.

DISPORDER Display order.

After declare will be like this:

Page 4: U-Report - Query Model Manual-En

7/28/2019 U-Report - Query Model Manual-En

http://slidepdf.com/reader/full/u-report-query-model-manual-en 4/4

 

Step 6.  Declare the report display XML in DB

  Log in database with the account ureport_ad.

  Input one record in the table CFG_FORWARD.

Comment of the table “CFG_FORWARD”.

字段名  描述 

PARAMETERMODUL

EID

Parameter module ID, now only support value “FORWARD” 

PARAMETERID Value should be page.report.querytemplatemodelaction.+querymodel id. This value should be same as PARAMETERMODULEID 

PARAMETERNAME Same as PARAMETERID。 

PARAMETERVALUE Value:

/action?obj=PPFAction&xmlpath=report/p_tt_ttstatus.xml&meth

od=ajax. The path after xmlpath is the path of XML file

DESCRIPTION Description. Not display in the system.

After declare will be like this:

Step 7.  Configure the module in System

Configure as flow shows:

--End