Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
/*
** Invoke Crystal Report Control to perform the
** print function for this form.
*/
DECLARE
sReportName VARCHAR2(64);
sReportDesc VARCHAR2(50);
sReportTable VARCHAR2(64);
sReportPath VARCHAR2(64);
sUserName VARCHAR2(16);
sPassWord VARCHAR2(16);
sDataBase VARCHAR2(64);
sConnect VARCHAR2(96);
sWhere VARCHAR2(64);
BEGIN
-- Retrieve the Log in information.
sUserName := GET_APPLICATION_PROPERTY (USERNAME);
sPassWord := GET_APPLICATION_PROPERTY (PASSWORD);
sDataBase := GET_APPLICATION_PROPERTY (CONNECT_STRING);
sConnect := 'DSN=' || sDataBase || ';UID=' || sUserName || ';PWD=' || sPassWord || ';DSQ=';
-- Retrieve the report information
SELECT RPT_PATH, RPT_FILENAME, RPT_DESC, RPT_TABLE_NAME INTO
sReportPath, sReportName, sReportDesc, sReportTable FROM
RPT_LIST WHERE RPT_NBR = 201;
-- Set the OCX up to execute
CRYSTAL_CRYSTALCTRL.ReportFileName(:item('OCXBLOCK.CRYSOCX').interface, sReportPath || sReportName);
CRYSTAL_CRYSTALCTRL.WindowTitle(:item('OCXBLOCK.CRYSOCX').interface, sReportDesc);
CRYSTAL_CRYSTALCTRL.WindowState(:item('OCXBLOCK.CRYSOCX').interface, CRYSTAL_CONSTANTS.crptMaximized);
CRYSTAL_CRYSTALCTRL.ole_Connect(:item('OCXBLOCK.CRYSOCX').interface, sConnect);
-- Load the arguments - this section should be set to be specific to each form
sWhere := '{' || sReportTable || '.CHAIN_NBR}=' || TO_CHAR(:SLSCHAINPF.Chain_Nbr);
CRYSTAL_CRYSTALCTRL.SelectionFormula(:item('OCXBLOCK.CRYSOCX').interface, sWhere);
-- Execute the report!
CRYSTAL_CRYSTALCTRL.Action(:item('OCXBLOCK.CRYSOCX').interface, 1);
EXCEPTION
WHEN OTHERS THEN
MESSAGE ('An Error has occurred. ');
END;