Direct DB Reports

- create a JDBC connection at run time to connect to database
- for database connection use info defined in WLS-admin console. The same used for java application
- a set of variable are added automatically in java application and are available to any direct DB reports
(MEX_ID,MFN_ID,MST_ID, FUNCTION_NAME,DESCRIPTION, EXECUTION_START_DATE, USER_NAME,PRODUCT,VERSION,DRV_PRINT_FINAL_PAGE)
- Stored procedure WW_start_report defined in package p2k_pmrpt executed at run time will build the report list and is called inside the template. Parameters used: MFN_ID,MEX_ID and WWCURTYP.

Tag Definition:
<wr:query select='EXEC p2k_pmrpt.WW_start_report P_MFN_ID = N${MFN_ID}, P_MEX_ID = N${MEX_ID}, P_WWCURTYP = O'RETURN'' var='varName2' nickname='CreateReportList'/>

Site Logo use an import tag. The URL used inside the import tag is defined in IMST for SITE_LOGO_URL preference. If a site log tag is defined in template but no vale for SITE_LOGO_URL will return an error when execution the select (Check the log file for errors)

Tag Definition:
<wr:import select='select preference_value from p2k_am_preference_values where mpf_id = (select ID from p2k_am_preferences where preference_code = 'SITE_LOGO_URL') and mst_id =${MST_ID}' source='URL' height='1150' width='1943' nickname='Site Logo'/>
Service Name must be defined when connection to DB is created in WL server – admin console. The service name must contain the domain name. If contains only the SID or is not defined will return an error at run time (Check the log file for errors) http://yyz-wvmwlspd5.neogov.net:7777/HLAppResources/release/images/DefaultLogo.gif
Steps to create a direct DB report:
1. Create a function and set Computer Language to ‘Windward Direct DB’
2. Set Subject Table – used in IMLQ for report list
3. Add execution rights, parameters, IMLQ as defined in any other repors
4. Table usages will contain the Execution table with retrieve execution rights only
5. Report layout will have the same content as any other report in our system. It must contain a ‘REPORT CRITERIA’ form group and as generic information for Run Options tab use the form definition: ‘REPORT’,’ REPORT SS’ or ‘REPORT L’