COMPILE FUNCTION Print_Errors(Parms) /* Prints Error Message Data 01/18/2010 - John C. Henry, J.C. Henry & Co., Inc. */ DECLARE FUNCTION Set_Printer, Get_Printer, Get_Status, Msg, RGB, Printer_Select, obj_Install DECLARE SUBROUTINE Set_Status, ErrMsg, Msg $INSERT OIPRINT_EQUATES $INSERT APPCOLORS $INSERT MSG_EQUATES ErrorTitle = 'Error in Stored Procedure "Print_Errors"' AppName = @APPID<1> **START PRINTING PROCESS** FileName = '' Title = 'Application Error Handler':@VM:'Application Error Listing' PageInfo = 1.0:@FM:1.5:@FM:1.0:@FM:0.6 PageSetup = 1 ;* Portrait PrintSetup = 2 PrintPath = Printer_Select('') ;* Select printer without changing default printer stat = Set_Printer("INIT",FileName,Title,PageInfo,PageSetup,PrintSetup,PrintPath) font = "Arial" font<2> = "10" font<3> = "L" font<4> = 0 ;* Normal font location = -0.15:@fm:-1.150:@fm:1.57:@fm:1 stat = Set_Printer('BMP',obj_Install('Get_Prop','ColorBMP'),location, 0,1) fontSpacing = 125 stat = Set_Printer("FONT",font,fontspacing) font<4> = 1 ;* Bold font stat = Set_Printer("FONTHEADFOOT",font) header = @VM:obj_Install('Get_Prop','CompTitle') header<2> = @VM:'Application Error Message' header<3> = '' header<4> = '' stat = Set_Printer("HEADER",header,colLen,colHead,colJust) footer = "Page: 'P' - 'D' 'T'" colfooter = "" stat = Set_Printer("FOOTER", footer, colfooter) * Make Column Heading colHead = '' ; colFmt = '' colHead<1,1> = 'Source' ; colFmt<1,1> = '<5000' colHead<1,2> = 'Message' ; colFmt<1,2> = '<6480' colData = Parms font<2> = 10 font<4> = 1 ;* Bold stat = Set_Printer('FONT',font,'100') stat = Set_Printer('ADDTABLE',colFmt,colHead,'',LTGREY$,'',0,TB_ALL) font<4> = 0 stat = Set_Printer('FONT',font,fontSpacing) stat = Set_Printer('ADDTABLE',colFmt,'',colData,LTGREY$,'',0,7) stat = Set_Printer("TEXT") stat = Set_Printer("TERM",1) RETURN