programmer’s report engine chris leuer – lead software engineer california community college...

22
Programmer’s Report Engine Chris Leuer – Lead Software Engineer California Community College Solution Center SunGard Higher Education

Upload: byron-allen

Post on 31-Dec-2015

213 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Programmer’s Report Engine Chris Leuer – Lead Software Engineer California Community College Solution Center SunGard Higher Education

Programmer’s Report Engine

Chris Leuer – Lead Software EngineerCalifornia Community College Solution Center

SunGard Higher Education

Page 2: Programmer’s Report Engine Chris Leuer – Lead Software Engineer California Community College Solution Center SunGard Higher Education

Scope

•How to define a report

•How to code a report

•Improvements/Questions

Page 3: Programmer’s Report Engine Chris Leuer – Lead Software Engineer California Community College Solution Center SunGard Higher Education

Skill set

• Banner Report Engine interface

• Query language SQL

• Programming PL/SQL

• XML

• Knowledge of MIS data dictionary

Page 4: Programmer’s Report Engine Chris Leuer – Lead Software Engineer California Community College Solution Center SunGard Higher Education

Setup

• transform XML repository setupmodify dbms_xdb.createfolder() in createresource.sql

• Security setup (7.5)Run rept_secr_roles_asgn.sql and rept_secr_class_asgn.sql or

use GUASECR

BAN_REPT_C

• Oracle job setup (7.5)

JOB_QUEUE_PROCESSES=5JOB_QUEUE_INTERVAL=60 (replaced by _job_queue_interval)

Page 5: Programmer’s Report Engine Chris Leuer – Lead Software Engineer California Community College Solution Center SunGard Higher Education

Oracle XML Repository

Page 6: Programmer’s Report Engine Chris Leuer – Lead Software Engineer California Community College Solution Center SunGard Higher Education

Extract XML

<STUDENT> <STUDENT_ROW> <First Name>Francois</First Name> <ID>210009406</ID> <Last Name>Pare</Last Name> <Street>18 Westward Way </Street> <ZIP_Code>19382 </ZIP Code> <State> PA </State> </STUDENT_ROW_>

<STUDENT_ROW> <First Name>Bob</First Name> <ID>210009406</ID> <Last Name>Barker</Last Name> <Street>2457 Queens Way </Street> <ZIP_Code>19902 </ZIP Code> <State> NY </State></STUDENT_ROW></STUDENT>

Banner report name + row

top elementparent element

child element

Banner report name

Page 7: Programmer’s Report Engine Chris Leuer – Lead Software Engineer California Community College Solution Center SunGard Higher Education

Transformed XML

<STUDENT> <STUDENT_ROW> <Name>Francois Pare</Name> <Ident>210009406</Ident> <State>Pennsylvania</State></STUDENT_ROW>

<STUDENT_ROW><Name>Bob Barker</Name> <Ident>210009406</Ident><State>California</State></STUDENT_ROW></STUDENT>

top elementparent element

new child element

Banner function element

Banner direct element

Banner map element

Page 8: Programmer’s Report Engine Chris Leuer – Lead Software Engineer California Community College Solution Center SunGard Higher Education

Transform elements

Direct - direct element value to element value relationship

Function - value derived from user created function

Map - maps to value in mapping form GVATRMP

Page 9: Programmer’s Report Engine Chris Leuer – Lead Software Engineer California Community College Solution Center SunGard Higher Education

Define a report

• define report GVARPDF• create query GVARSQL• define column mapping GVAMAPD • define parameters GVAPDEF• define final elements GVATREL• Define any element maps GVATRMP

demo..

Page 10: Programmer’s Report Engine Chris Leuer – Lead Software Engineer California Community College Solution Center SunGard Higher Education

Banner map

MIS elementSB11Education level

Page 11: Programmer’s Report Engine Chris Leuer – Lead Software Engineer California Community College Solution Center SunGard Higher Education

Use GVATRMP

Page 12: Programmer’s Report Engine Chris Leuer – Lead Software Engineer California Community College Solution Center SunGard Higher Education

GVATREL Function

MIS item SB00

Page 13: Programmer’s Report Engine Chris Leuer – Lead Software Engineer California Community College Solution Center SunGard Higher Education

Transform function

-- support cursor in gv_mis_global_bp

CURSOR Get_SPBPERS_C(p_pidm SPRIDEN.SPRIDEN_PIDM%TYPE) IS SELECT SPBPERS_SSN FROM SPBPERS WHERE SPBPERS_PIDM = p_pidm;

Page 14: Programmer’s Report Engine Chris Leuer – Lead Software Engineer California Community College Solution Center SunGard Higher Education

Function (cont)

FUNCTION f_get_identifier(rowofelements IN rept_rowofelements) RETURN VARCHAR2

IS

lv_extract_pidm gvbtrel.gvbtrel_element%TYPE := 'PIDM'; lv_pidm SPRIDEN.SPRIDEN_PIDM%TYPE; lv_extract_id gvbtrel.gvbtrel_element%TYPE := 'ID'; lv_id SPRIDEN.SPRIDEN_ID%TYPE; lv_ssn SPBPERS.SPBPERS_SSN%TYPE;

..

Page 15: Programmer’s Report Engine Chris Leuer – Lead Software Engineer California Community College Solution Center SunGard Higher Education

Function (cont)

OPEN Get_SPBPERS_C(lv_pidm); FETCH Get_SPBPERS_C INTO lv_ssn; IF Get_SPBPERS_C%NOTFOUND OR lv_ssn IS NULL OR F_is_all_numeric(lv_ssn) = 'N' OR LENGTH(lv_ssn) <> 9 THEN CLOSE Get_SPBPERS_C; RETURN lv_id; ELSE CLOSE Get_SPBPERS_C; RETURN lv_ssn; END IF; END f_get_identifier;

Page 16: Programmer’s Report Engine Chris Leuer – Lead Software Engineer California Community College Solution Center SunGard Higher Education

Function (cont)

BEGIN -- find element PIDM

lv_pidm :=gv_rept_xml.f_find_element_value_inrow(lv_extract_pidm,

rowofelements);

lv_id :=gv_rept_xml.f_find_element_value_inrow(lv_extract_id, rowofelements);

..

Page 17: Programmer’s Report Engine Chris Leuer – Lead Software Engineer California Community College Solution Center SunGard Higher Education

Banner map/function combo

MIS elementSB22 Academic Standing

Page 18: Programmer’s Report Engine Chris Leuer – Lead Software Engineer California Community College Solution Center SunGard Higher Education

GVATRMP

Page 19: Programmer’s Report Engine Chris Leuer – Lead Software Engineer California Community College Solution Center SunGard Higher Education

Use F_mapvalue()

OPEN Get_SHRTTRM_C(lv_pidm,lv_term); FETCH Get_SHRTTRM_C INTO lv_cast_code;.. RETURN

gv_rept_xml.F_MapValue(lv_report,'SB22',lv_cast_code);

Page 20: Programmer’s Report Engine Chris Leuer – Lead Software Engineer California Community College Solution Center SunGard Higher Education

Tips

• Always use COPY feature on GVVRPDF• Copy existing CALB packages

ex: sv_mis_sx to sz_mis_sx

• Add a pidm to WHERE CLAUSE in GVARSQL for when missing data

• Run GVPREPG to purge old XML• Run SQL script (calling gv_rept_engine) for

full error

Page 21: Programmer’s Report Engine Chris Leuer – Lead Software Engineer California Community College Solution Center SunGard Higher Education

Improvements

• Function to return seqno• Function to return parameters found in

GVBTRPR• Improvements to performance by by-

passing XMLDom implementation for large data volumes

• Delete capability• Suggestions?

Page 22: Programmer’s Report Engine Chris Leuer – Lead Software Engineer California Community College Solution Center SunGard Higher Education

End

• Question?• Thanks for attending!

Chris Leuer, SunGard

[email protected]