Sunteți pe pagina 1din 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

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:

PPFV0 1.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.

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.xls

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 TEMPLATEMODELID TEMPLATEMODELNAME TEMPLATEMODELPAGE TEMPLATEMODELFUNCTION ENABLE DESCRIPTION DISPORDER After declare will be like this: Comments Modelid, it must as same as the procedure name, and should be small character. Model name. Mapping the Query page and query XML file page.report.querytemplatemodelaction.modelid. Transact class name. Now only support com.inspur.ureport.rqe.adapter.ProcedureAdapter 1-Enable, 0-Unenale Description, will not display in system. Display order.

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 PARAMETERID PARAMETERNAME PARAMETERVALUE Parameter module ID, now only support value FORWARD Value should be page.report.querytemplatemodelaction.+query model id. This value should be same as PARAMETERMODULEID Same as PARAMETERID Value: /action?obj=PPFAction&xmlpath=report/p_tt_ttstatus.xml&meth od=ajax. The path after xmlpath is the path of XML file Description. Not display in the system.

DESCRIPTION

After declare will be like this:

Step 7. Configure the module in System


Configure as flow shows:

--End

S-ar putea să vă placă și