Dear All,
I would like to print PDF file to printer without user see the PDF file on screen.
step 1. Print to PDF file.
step 2. send PDF file to printer without user action.
I try ..\samples\pdf.prg but doesn't work.
Thanks in advance,
Dutch
cnavarro wrote:HaruPdf not need any GUI, is pure Harbour
Jack wrote:Hi,
I use this :
wfile:="c:\apps\test.pdf"
if file(wfile)
shellexecute( 0 , "print" , wfile)
sysrefresh()
syswait(3)
*
endif
Try it,
Philippe
shellexecute( 0 , "print" , wfile, nil, nil, 0 )
nageswaragunupudi wrote:Please try
- Code: Select all Expand view RUN
shellexecute( 0 , "print" , wfile, nil, nil, 0 )
[path]\pdftoprinter.exe <pdfnamewithfullpath>
nageswaragunupudi wrote:Please check this:
http://www.columbia.edu/~em36/pdftoprinter.html
You can download "pdftoprinter.exe" and then use it on command line
- Code: Select all Expand view RUN
[path]\pdftoprinter.exe <pdfnamewithfullpath>
Silently prints to the default printer.
From FWH program, you can run this command with WaitRun() or WinExec()
function PrintPDF( cPdf )
local oWord, oDoc, lVisible
if Empty( cPdf ) .or. !File( cPdf )
MsgAlert( "Invalid File Name" )
return .f.
elseif ( oWord := WinWordObj() ) == nil
MsgAlert( FWString( "Word not installed" ) )
return .f.
endif
oWord:DisplayAlerts := .f.
lVisible := oWord:Visible
oWord:Visible := .f.
oDoc := oWord:Documents:Open( truename( cPdf ), .f., .t. )
oDoc:PrintOut()
oDoc:Close()
oWord:Visible := lVisible
return .t.
#include "FiveWin.ch"
static oWnd
function Main()
local oBar, cPdf
cPdf := "C:\FWH\SAMPLES\MODELO.PDF" // NO FUNCIONA
// cPdf := "C:\FWH\SAMPLES\MATERIAL.TXT" // FUNCIONA, IMPRIME NORMAL.
cPdf := "C:\FWH\SAMPLES\MODELO.RTF" // FUNCIONA, IMPRIME NORMAL.
DEFINE WINDOW oWnd TITLE "Test Word"
DEFINE BUTTONBAR oBar _3D OF oWnd
DEFINE BUTTON OF oBar ACTION( PrintPDF( cPdf ) )
SET MESSAGE OF oWnd TO "Test Word" NOINSET CLOCK DATE KEYBOARD
ACTIVATE WINDOW oWnd
return nil
function PrintPDF( cPdf )
local oWord, oDoc, lVisible
if Empty( cPdf ) .or. !File( cPdf )
MsgAlert( "Invalid File Name" )
return .f.
elseif ( oWord := WinWordObj() ) == nil
MsgAlert( FWString( "Word not installed" ) )
return .f.
endif
oWord:DisplayAlerts := .f.
lVisible := oWord:Visible
oWord:Visible := .f.
oDoc := oWord:Documents:Open( truename( cPdf ), .f., .t. )
oDoc:PrintOut()
oDoc:Close()
oWord:Visible := lVisible
return .t.
// FIN
// ReqPrint.prg
#INCLUDE "FIVEWIN.CH"
Static lOk
//--------------------------
Func _ReqPrint( oRsTrav )
Local oDlg,oView,nView
Local oSay,cSay,cSay1,oSay1,cDefa
Local oFontB
Local oBtn1,oBtn2
Local lIsRunning
nVIEW := 1
cSay := SPACE(30)
oSay := NIL
cDefa := set(7)
// controls cancel of report
lOk := .f.
// lIsRunning := .f.
oFontB := TFont():New("Ms Sans Serif",,-6,.F.,.T. ,,,,.F. )
SolidWhite()
DEFINE DIALOG oDlg RESOURCE "REQPRINT" ;
TITLE "Request Print Routine" ;
REDEFINE SAY oSay1 ID 128 of oDlg UPDATE
oSay1:SetFont( oFontB )
oSay1:SetColor( nRgb(7,7,224)) // blue
REDEFINE RADIO oView VAR nView ID 139,140 ;
OF oDlg COLOR 0
REDEFINE GET oSay VAR cSay ID 120 of oDlg COLOR CLR_BLACK, 16053492 READONLY
REDEFINE BTNBMP oBtn1 ID 111 of oDlg ;
RESOURCE "OK" ;
PROMPT "Ok" LEFT 2007;
ACTION ( lOk := .t.,_ReqPrint1( nView,oDlg,oSay,@cSay,oRsTrav)) ; // global function
GRADIENT GreyButtonGrad()
REDEFINE BTNBMP oBtn2 ID 112 of oDlg ;
RESOURCE "CANCEL" ;
PROMPT "Cancel" LEFT 2007;
ACTION ( lOK := .F. ,;
dbCloseAll() ,oDlg:End()) ;
GRADIENT GreyButtonGrad()
ACTIVATE DIALOG oDlg ;
ON INIT( oDlg:Move(115,180)) ;
VALID (!GETKEYSTATE( 27 )) // do not allow esc key here
CLOSE DATABASES
LightGreyGrad()
Return(nil)
//-------------------------------------------
// Global Function to be used when request is Approved or Rejected
//
Func _ReqPrint1( nView,oDlg,oSay,cSay,oRsTrav ) // cToPrf
Local oPrint
Local oFont8,oFont8b,oFont10,oFont10b,ofont12ib,oFont12b,oFOnt14,oFont24b,oFont10d,oFont10i
Local oPen1,nLines,nPages,nMargin,nPage
Local nRowStep,nColStep
Local cHead1,cHead2,cText,yText,nPrice
Local xLine,nLinCnt,i
Local dDate
Local cTrainTp1,cTrainTp2,cTrainTp3,cTrainTp4,cTrainTp5,cTrainTp6
Local cLogin,cEmail,nStart
cEmail := oRsTrav:Fields("EmpEmail"):Value
if empty(cEmail)
cEmail := alltrim(xLogin)
Else
nStart := at( "@", cEmail )
cEmail := Substr(cEmail,1,nStart-1)
Endif
//nView := 3
Do Case
Case nVIEW = 1
PRINTER oPRINT FROM USER ;
PREVIEW MODAL ;
NAME "Request Print Routine "+xLOGIN
IF EMPTY( oPRINT:hDC )
MsgStop ( "Printer not Ready !" )
CLOSE DATABASES
oDlg:END()
RETURN(NIL)
ENDIF
Case nVIEW = 2
PRINTER oPRINT from USER ;
NAME "Request Print Routine for "+xLOGIN
IF EMPTY( oPRINT:hDC )
MsgStop ( "Printer not Ready !" )
CLOSE DATABASES
oDlg:END()
RETURN(NIL)
ENDIF
Case nVIEW = 3
PRINT oPrint FILE "C:\Dbtmp\"+cEmail+".Pdf" // <------------------------ here is the trick
EndCase
oFont8 := TFont():New( "Times New Roman", 0,-8, .F.,.F. , , , ,.F.,,,,,,, oPRINT, )
oFont8b := TFont():New( "Times New Roman", 0,-8, .F.,.T. , , , ,.F.,,,,,,, oPRINT, )
oFont10 := TFont():New( "Arial", 0,-9, .F.,.F. , , , ,.F.,,,,,,, oPRINT, ) //-10
oFont10b := TFont():New( "Times New Roman", 0,-10,.F.,.T. , , , ,.F.,,,,,,, oPRINT, )
oFont10i := TFont():New( "Times New Roman", 0,-10,.F.,.T. , , , ,.T.,,,,,,, oPRINT, )
oFont12ib := TFont():New( "Times New Roman", 0,-12,.F.,.T. , , , ,.T.,,,,,,, oPRINT, )
oFont12b := TFont():New( "Times New Roman", 0,-12,.F.,.T. , , , ,.F.,,,,,,, oPRINT, )
oFont14b := TFont():New( "Times New Roman", 0,-14,.F.,.T. , , , ,.F.,,,,,,, oPRINT, )
oFont24b := TFont():New( "Times New Roman", 0,-24,.F.,.T. , , , ,.F.,,,,,,, oPRINT, )
oFont10d := TFont():New( "Courier New", 0,-10,.F.,.T. , , , ,.F.,,,,,,, oPRINT, )
DEFINE PEN oPen1 WIDTH 1 // 5 //10
*cSay := "Generating Output"
*oSay:ReFresh()
*SysReFresh()
*SysWait(1) // take out later
//lIsRunning := .t. // cancel trap
nLines := 0
nPages := 1
nRowStep := oPrint:nVertRes() / 55 // pixel per line = 57.65 @ 55
nColStep := oPrint:nHorzRes() /130 // columns
oPRINT:StartPage()
nMargin := Int(oPrint:nLogPixelX()*0.2)
LINE := nMargin
nPage := 1
cHead1 := "State of South Carolina Department of Insurance"
cHead2 := "Travel / Training Request Form"
oPRINT:SAY ( LINE, (oPrint:nHorzRes()*.25), cHead1, oFONT14b )
Line += oFont12b:nHeight
oPRINT:SAY ( LINE, (oPrint:nHorzRes()*.34), cHead2, oFONT14b )
Line += oFont12b:nHeight
Line += oFont12b:nHeight
oPrint:Line( line, (oPrint:nHorzRes()*.02 ), line, (oPrint:nHorzRes()*.9792), oPen1 ) // top line
Line += oFont12b:nHeight
cText := "Is this Associated with a"
oPRINT:SAY ( LINE, (oPrint:nHorzRes()*.02), cText, oFONT10 )
cText := If(empty(oRsTrav:Fields("PrevAppr"):Value)," ",oRsTrav:Fields("PrevAppr"):Value )
oPRINT:SAY ( LINE, (oPrint:nHorzRes()*.21), cText, oFONT10b )
Line += oFont10b:nHeight
cText := "Previously approved"
oPRINT:SAY ( LINE, (oPrint:nHorzRes()*.02), cText, oFONT10 )
Line += oFont10b:nHeight
cText := "Designation (Y/N)"
oPRINT:SAY ( LINE, (oPrint:nHorzRes()*.02), cText, oFONT10 )
*oPrint:Box( line, (oPrint:nHorzRes()* .20 ), Line* .77, (oPrint:nHorzRes()*.23 ), oPen1 ) // associaed with
Line -= oFont14b:nHeight+5
Line -= oFont8b:nHeight-12
cText := "If Yes, Please list"
oPRINT:SAY ( LINE, (oPrint:nHorzRes()*.25), cText, oFONT10 )
Line += oFont10b:nHeight
cText := "Designation"
oPRINT:SAY ( LINE, (oPrint:nHorzRes()*.25), cText, oFONT10 )
Line += oFont10b:nHeight
cText := "( 200 char )"
oPRINT:SAY ( LINE, (oPrint:nHorzRes()*.25), cText, oFONT10 )
Line -= oFont14b:nHeight+22
oPrint:Box( line, (oPrint:nHorzRes()* .38 ), Line* 1.70, (oPrint:nHorzRes()*.81 ), oPen1 ) // designation box
xLine := Line
cText := oRsTrav:Fields("Design"):Value
If Empty(cText) .or. cText = " "
Else
Line += oFont8:nHeight-10
cText := Alltrim( cText)
nLinCnt := MlCount( cText, 75 )
IF nLinCnt > 0
For x := 1 to nLinCnt
yText := MemoLine( cText, 75, x )
oPRINT:SAY ( LINE, (oPrint:nHorzRes()*.39 ), yText, oFONT8 )
Line += oFont8:nHeight
Next
Endif
Endif
Line := xLine
cText := "In State (Y/N)"
oPRINT:SAY ( LINE, (oPrint:nHorzRes()*.82), cText, oFONT10 )
cText := If(empty(oRsTrav:Fields("InState"):Value)," ",oRsTrav:Fields("Instate"):Value )
oPRINT:SAY ( LINE, (oPrint:nHorzRes()*.96), cText, oFONT10b )
Line += oFont12b:nHeight+20
*oPrint:Box( line, (oPrint:nHorzRes()* .98 ), Line* .77, (oPrint:nHorzRes()*.95 ), oPen1 ) // in state
Line -= oFont14b:nHeight+4
Line += oFont14b:nHeight//+20
Line += oFont10b:nHeight
cText := "Out State (Y/N)"
oPRINT:SAY ( LINE, (oPrint:nHorzRes()*.82), cText, oFONT10 )
cText := If(empty(oRsTrav:Fields("OutState"):Value)," ",oRsTrav:Fields("OutState"):Value )
oPRINT:SAY ( LINE, (oPrint:nHorzRes()*.96), cText, oFONT10b )
Line += oFont12b:nHeight+20
*oPrint:Box( line, (oPrint:nHorzRes()* .98 ), Line* .81, (oPrint:nHorzRes()*.95 ), oPen1 ) // out state
*Line -= oFont14b:nHeight+8
*Line += oFont12b:nHeight+40 // fixed overlap
Line += oFont12b:nHeight+20
Line += oFont12b:nHeight+3
cText := "Date Leaving or Starting :"
oPRINT:SAY ( LINE, (oPrint:nHorzRes()*.02), cText, oFONT10 )
dDate := If(empty(oRsTrav:Fields("Leave"):Value),ctod("00/00/00"),;
TtoDate(oRsTrav:Fields("Leave"):Value))
cText := dtoc(dDate)
oPRINT:SAY ( LINE, (oPrint:nHorzRes()*.25), cText, oFONT10b )
cText := "Vendor / Sponsor :"
oPRINT:SAY ( LINE, (oPrint:nHorzRes()*.38), cText, oFONT10 )
cText := If(empty(oRsTrav:Fields("Sponsor"):Value)," ",oRsTrav:Fields("Sponsor"):Value )
oPRINT:SAY ( LINE, (oPrint:nHorzRes()*.55), cText, oFONT10b )
Line += oFont10b:nHeight
cText := "Date Returning or Ending :"
oPRINT:SAY ( LINE, (oPrint:nHorzRes()*.02), cText, oFONT10 )
dDate := If(empty(oRsTrav:Fields("Return"):Value),ctod("00/00/00"),;
TtoDate(oRsTrav:Fields("Return"):Value))
cText := dtoc(dDate)
oPRINT:SAY ( LINE, (oPrint:nHorzRes()*.25), cText, oFONT10b )
cText := "Conference / Event :"
oPRINT:SAY ( LINE, (oPrint:nHorzRes()*.38), cText, oFONT10 )
cText := If(empty(oRsTrav:Fields("Event"):Value)," ",oRsTrav:Fields("Event"):Value )
oPRINT:SAY ( LINE, (oPrint:nHorzRes()*.55), cText, oFONT10b )
// employee name
Line += oFont10b:nHeight
cText := "Emp Name :"
oPRINT:SAY ( LINE, (oPrint:nHorzRes()*.02), cText, oFONT10 )
cText := If(empty(oRsTrav:Fields("Employee"):Value)," ",oRsTrav:Fields("EMployee"):Value )
cText := UpperLower( cText )
oPRINT:SAY ( LINE, (oPrint:nHorzRes()*.13), cText, oFONT10b )
cText := "Location :"
oPRINT:SAY ( LINE, (oPrint:nHorzRes()*.38), cText, oFONT10 )
cText := If(empty(oRsTrav:Fields("Location"):Value)," ",oRsTrav:Fields("Location"):Value )
oPRINT:SAY ( LINE, (oPrint:nHorzRes()*.55), cText, oFONT10b )
Line += oFont10b:nHeight
cText := "Emp E-Mail :"
oPRINT:SAY ( LINE, (oPrint:nHorzRes()*.02), cText, oFONT10 )
cText := If(empty(oRsTrav:Fields("EmpEmail"):Value)," ",oRsTrav:Fields("EmpEmail"):Value )
cText := Lower( cText )
oPRINT:SAY ( LINE, (oPrint:nHorzRes()*.13), cText, oFONT10b )
Line += oFont8:nHeight
cText := "Meals"
oPRINT:SAY ( LINE, (oPrint:nHorzRes()*.55), cText, oFONT10 )
cText := "Cost"
oPRINT:SAY ( LINE, (oPrint:nHorzRes()*.783), cText, oFONT10 )
cText := "Total"
oPRINT:SAY ( LINE, (oPrint:nHorzRes()*.94), cText, oFONT10 )
Line -= oFont8:nHeight
Line += oFont10b:nHeight
Line += oFont10b:nHeight
cText := "Purpose or"
oPRINT:SAY ( LINE, (oPrint:nHorzRes()*.02), cText, oFONT10 )
// number of breakfasts --------------------------
nPrice := If(empty(oRsTrav:Fields("Break"):Value), 0, oRsTrav:Fields("Break"):Value )
Do Case
Case nPrice = 0
oPRINT:SAY ( LINE, (oPrint:nHorzRes()*.565 ), Transform( nPrice, "9,999" ), oFONT10b )
Case nPrice > 0 .and. nPrice < 10
oPRINT:SAY ( LINE, (oPrint:nHorzRes()*.565 ), Transform( nPrice, "9,999" ), oFont10b )
Case nPrice >= 10 .and. nPrice < 100
oPRINT:SAY ( LINE, (oPrint:nHorzRes()*.56 ), Transform( nPrice, "9,999" ), oFont10b )
Case nPrice >= 100 .and. nPrice < 1000
oPRINT:SAY ( LINE, (oPrint:nHorzRes()*.556 ), Transform( nPrice, "9,999" ), oFont10b )
Case nPrice >= 1000 .and. nPrice < 10000
oPRINT:SAY ( LINE, (oPrint:nHorzRes()*.55 ), Transform( nPrice, "9,999" ), oFont10b )
Case nPrice >= 10000 .and. nPrice < 100000
oPRINT:SAY ( LINE, (oPrint:nHorzRes()*.54 ), Transform( nPrice, "99,999" ), oFont10b )
OtherWise
oPRINT:SAY ( LINE, (oPrint:nHorzRes()*.54 ), Transform( nPrice, "99,999" ), oFont10b )
EndCase
oPrint:Line( line, (oPrint:nHorzRes()*.55 ), line, (oPrint:nHorzRes()*.9792), oPen1 ) // top line
// BREAKFAST -----------------------------------------------
cText := "Breakfasts x"
oPRINT:SAY ( LINE, (oPrint:nHorzRes()*.62 ), cText, oFONT10 )
nPrice := If(empty(oRsTrav:Fields("BreakC"):Value), 0.00, oRsTrav:Fields("BreakC"):Value )
// breakfast cost
Do Case
Case nPrice = 0
oPRINT:SAY ( LINE, (oPrint:nHorzRes()*.77 ), Transform( nPrice, "9,999.99" ), oFONT10b )
Case nPrice > 0 .and. nPrice < 10
oPRINT:SAY ( LINE, (oPrint:nHorzRes()*.77 ), Transform( nPrice, "9,999.99" ), oFont10b ) /////
Case nPrice >= 10 .and. nPrice < 100
oPRINT:SAY ( LINE, (oPrint:nHorzRes()*.77 ), Transform( nPrice, "9,999.99" ), oFont10b )
Case nPrice >= 100 .and. nPrice < 1000
oPRINT:SAY ( LINE, (oPrint:nHorzRes()*.62 ), Transform( nPrice, "9,999.99" ), oFont10b )
Case nPrice >= 1000 .and. nPrice < 10000
oPRINT:SAY ( LINE, (oPrint:nHorzRes()*.62 ), Transform( nPrice, "9,999.99" ), oFont10b )
Case nPrice >= 10000 .and. nPrice < 100000
oPRINT:SAY ( LINE, (oPrint:nHorzRes()*.60 ), Transform( nPrice, "99,999.99" ), oFont10b )
OtherWise
oPRINT:SAY ( LINE, (oPrint:nHorzRes()*.60 ), Transform( nPrice, "99,999.99" ), oFont10b )
EndCase
cText := "= $"
oPRINT:SAY ( LINE, (oPrint:nHorzRes()*.85 ), cText, oFONT10 )
// breakfast totals
nPrice := If(empty(oRsTrav:Fields("BreakT"):Value), 0.00, oRsTrav:Fields("BreakT"):Value )
Do Case
Case nPrice = 0
oPRINT:SAY ( LINE, (oPrint:nHorzRes()*.9238 ),Transform( nPrice, "999,999.99" ), oFONT10b ) //.92
Case nPrice > 0 .and. nPrice < 10
oPRINT:SAY ( LINE, (oPrint:nHorzRes()*.9238 ),Transform( nPrice, "999,999.99" ), oFont10b )
// 92
Case nPrice >= 10 .and. nPrice < 100
oPRINT:SAY ( LINE, (oPrint:nHorzRes()*.92 ),Transform( nPrice, "999,999.99" ), oFont10b ) /////////
Case nPrice >= 100 .and. nPrice < 1000
oPRINT:SAY ( LINE, (oPrint:nHorzRes()*.915), Transform( nPrice, "999,999.99" ), oFont10b )
Case nPrice >= 1000 .and. nPrice < 10000
oPRINT:SAY ( LINE, (oPrint:nHorzRes()*.91), Transform( nPrice, "999,999.99" ), oFont10b )
Case nPrice >= 10000 .and. nPrice < 100000
oPRINT:SAY ( LINE, (oPrint:nHorzRes()*.91), Transform( nPrice, "999,999.99" ), oFont10b )
OtherWise
oPRINT:SAY ( LINE, (oPrint:nHorzRes()*.90), Transform( nPrice, "999,999.99" ), oFont10b )
EndCase
oPrint:Box( line, (oPrint:nHorzRes()* .11 ), Line* 1.28, (oPrint:nHorzRes()*.54 ), oPen1 ) // purpose or benefits box
Line += oFont10b:nHeight
cText := "Benefits"
oPRINT:SAY ( LINE, (oPrint:nHorzRes()*.02), cText, oFONT10 )
// LUNCH --------------------------------------------------
// number of lunches
nPrice := If(empty(oRsTrav:Fields("Lunch"):Value), 0, oRsTrav:Fields("Lunch"):Value )
Do Case
Case nPrice = 0
oPRINT:SAY ( LINE, (oPrint:nHorzRes()*.565 ), Transform( nPrice, "9,999" ), oFONT10b )
Case nPrice > 0 .and. nPrice < 10
oPRINT:SAY ( LINE, (oPrint:nHorzRes()*.565 ), Transform( nPrice, "9,999" ), oFont10b )
Case nPrice >= 10 .and. nPrice < 100
oPRINT:SAY ( LINE, (oPrint:nHorzRes()*.56 ), Transform( nPrice, "9,999" ), oFont10b )
Case nPrice >= 100 .and. nPrice < 1000
oPRINT:SAY ( LINE, (oPrint:nHorzRes()*.556 ), Transform( nPrice, "9,999" ), oFont10b )
Case nPrice >= 1000 .and. nPrice < 10000
oPRINT:SAY ( LINE, (oPrint:nHorzRes()*.55 ), Transform( nPrice, "9,999" ), oFont10b )
Case nPrice >= 10000 .and. nPrice < 100000
oPRINT:SAY ( LINE, (oPrint:nHorzRes()*.54 ), Transform( nPrice, "99,999" ), oFont10b )
OtherWise
oPRINT:SAY ( LINE, (oPrint:nHorzRes()*.54 ), Transform( nPrice, "99,999" ), oFont10b )
EndCase
// lunch cost
cText := "Lunches x"
oPRINT:SAY ( LINE, (oPrint:nHorzRes()*.62 ), cText, oFONT10 )
nPrice := If(empty(oRsTrav:Fields("LunchC"):Value), 0.00, oRsTrav:Fields("LunchC"):Value )
Do Case
Case nPrice = 0
oPRINT:SAY ( LINE, (oPrint:nHorzRes()*.77 ), Transform( nPrice, "9,999.99" ), oFONT10b )
Case nPrice > 0 .and. nPrice < 10
oPRINT:SAY ( LINE, (oPrint:nHorzRes()*.62 ), Transform( nPrice, "9,999.99" ), oFont10b )
Case nPrice >= 10 .and. nPrice < 100
oPRINT:SAY ( LINE, (oPrint:nHorzRes()*.765 ), Transform( nPrice, "9,999.99" ), oFont10b )
Case nPrice >= 100 .and. nPrice < 1000
oPRINT:SAY ( LINE, (oPrint:nHorzRes()*.62 ), Transform( nPrice, "9,999.99" ), oFont10b )
Case nPrice >= 1000 .and. nPrice < 10000
oPRINT:SAY ( LINE, (oPrint:nHorzRes()*.62 ), Transform( nPrice, "9,999.99" ), oFont10b )
Case nPrice >= 10000 .and. nPrice < 100000
oPRINT:SAY ( LINE, (oPrint:nHorzRes()*.60 ), Transform( nPrice, "99,999.99" ), oFont10b )
OtherWise
oPRINT:SAY ( LINE, (oPrint:nHorzRes()*.60 ), Transform( nPrice, "99,999.99" ), oFont10b )
EndCase
cText := "= $"
oPRINT:SAY ( LINE, (oPrint:nHorzRes()*.85 ), cText, oFONT10 )
// lunch totals
nPrice := If(empty(oRsTrav:Fields("LunchT"):Value), 0.00, oRsTrav:Fields("LunchT"):Value )
Do Case
Case nPrice = 0
oPRINT:SAY ( LINE, (oPrint:nHorzRes()*.9238 ),Transform( nPrice, "999,999.99" ), oFONT10b )
Case nPrice > 0 .and. nPrice < 10
oPRINT:SAY ( LINE, (oPrint:nHorzRes()*.92 ),Transform( nPrice, "999,999.99" ), oFont10b )
Case nPrice >= 10 .and. nPrice < 100
oPRINT:SAY ( LINE, (oPrint:nHorzRes()*.92 ),Transform( nPrice, "999,999.99" ), oFont10b )
Case nPrice >= 100 .and. nPrice < 1000
oPRINT:SAY ( LINE, (oPrint:nHorzRes()*.915),Transform( nPrice, "999,999.99" ), oFont10b )
Case nPrice >= 1000 .and. nPrice < 10000
oPRINT:SAY ( LINE, (oPrint:nHorzRes()*.91), Transform( nPrice, "999,999.99" ), oFont10b )
Case nPrice >= 10000 .and. nPrice < 100000
oPRINT:SAY ( LINE, (oPrint:nHorzRes()*.90), Transform( nPrice, "999,999.99" ), oFont10b )
OtherWise
oPRINT:SAY ( LINE, (oPrint:nHorzRes()*.90), Transform( nPrice, "999,999.99" ), oFont10b )
EndCase
Line += oFont10b:nHeight
cText := "(200) char"
oPRINT:SAY ( LINE, (oPrint:nHorzRes()*.02), cText, oFONT10 )
// number of dinner meals
nPrice := If(empty(oRsTrav:Fields("Dinner"):Value), 0, oRsTrav:Fields("Dinner"):Value )
Do Case
Case nPrice = 0
oPRINT:SAY ( LINE, (oPrint:nHorzRes()*.565 ), Transform( nPrice, "9,999" ), oFONT10b )
Case nPrice > 0 .and. nPrice < 10
oPRINT:SAY ( LINE, (oPrint:nHorzRes()*.565 ), Transform( nPrice, "9,999" ), oFont10b )
Case nPrice >= 10 .and. nPrice < 100
oPRINT:SAY ( LINE, (oPrint:nHorzRes()*.56 ), Transform( nPrice, "9,999" ), oFont10b )
Case nPrice >= 100 .and. nPrice < 1000
oPRINT:SAY ( LINE, (oPrint:nHorzRes()*.556 ), Transform( nPrice, "9,999" ), oFont10b )
Case nPrice >= 1000 .and. nPrice < 10000
oPRINT:SAY ( LINE, (oPrint:nHorzRes()*.55 ), Transform( nPrice, "9,999" ), oFont10b )
Case nPrice >= 10000 .and. nPrice < 100000
oPRINT:SAY ( LINE, (oPrint:nHorzRes()*.54 ), Transform( nPrice, "99,999" ), oFont10b )
OtherWise
oPRINT:SAY ( LINE, (oPrint:nHorzRes()*.54 ), Transform( nPrice, "99,999" ), oFont10b )
EndCase
// dinner cost
cText := "Dinners x"
oPRINT:SAY ( LINE, (oPrint:nHorzRes()*.62 ), cText, oFONT10 )
nPrice := If(empty(oRsTrav:Fields("DinnerC"):Value), 0.00, oRsTrav:Fields("DinnerC"):Value )
Do Case
Case nPrice = 0
oPRINT:SAY ( LINE, (oPrint:nHorzRes()*.77 ), Transform( nPrice, "9,999.99" ), oFONT10b )
Case nPrice > 0 .and. nPrice < 10
oPRINT:SAY ( LINE, (oPrint:nHorzRes()*.62 ), Transform( nPrice, "9,999.99" ), oFont10b )
Case nPrice >= 10 .and. nPrice < 100
oPRINT:SAY ( LINE, (oPrint:nHorzRes()*.765), Transform( nPrice, "9,999.99" ), oFont10b )
Case nPrice >= 100 .and. nPrice < 1000
oPRINT:SAY ( LINE, (oPrint:nHorzRes()*.62 ), Transform( nPrice, "9,999.99" ), oFont10b )
Case nPrice >= 1000 .and. nPrice < 10000
oPRINT:SAY ( LINE, (oPrint:nHorzRes()*.62 ), Transform( nPrice, "9,999.99" ), oFont10b )
Case nPrice >= 10000 .and. nPrice < 100000
oPRINT:SAY ( LINE, (oPrint:nHorzRes()*.60 ), Transform( nPrice, "99,999.99" ), oFont10b )
OtherWise
oPRINT:SAY ( LINE, (oPrint:nHorzRes()*.60 ), Transform( nPrice, "99,999.99" ), oFont10b )
EndCase
cText := "= $"
oPRINT:SAY ( LINE, (oPrint:nHorzRes()*.85 ), cText, oFONT10 )
// dinner totals
nPrice := If(empty(oRsTrav:Fields("DinnerT"):Value), 0.00, oRsTrav:Fields("DinnerT"):Value )
Do Case
Case nPrice = 0
oPRINT:SAY ( LINE, (oPrint:nHorzRes()*.9238 ),Transform( nPrice, "999,999.99" ), oFONT10b )
Case nPrice > 0 .and. nPrice < 10
oPRINT:SAY ( LINE, (oPrint:nHorzRes()*.92 ),Transform( nPrice, "999,999.99" ), oFont10b )
Case nPrice >= 10 .and. nPrice < 100
oPRINT:SAY ( LINE, (oPrint:nHorzRes()*.92 ),Transform( nPrice, "999,999.99" ), oFont10b )
Case nPrice >= 100 .and. nPrice < 1000
oPRINT:SAY ( LINE, (oPrint:nHorzRes()*.915), Transform( nPrice, "999,999.99" ), oFont10b )
Case nPrice >= 1000 .and. nPrice < 10000
oPRINT:SAY ( LINE, (oPrint:nHorzRes()*.91), Transform( nPrice, "999,999.99" ), oFont10b ) /////////////////
Case nPrice >= 10000 .and. nPrice < 100000
oPRINT:SAY ( LINE, (oPrint:nHorzRes()*.90), Transform( nPrice, "999,999.99" ), oFont10b )
OtherWise
oPRINT:SAY ( LINE, (oPrint:nHorzRes()*.90), Transform( nPrice, "999,999.99" ), oFont10b )
EndCase
Line += oFont10b:nHeight
Line += oFont10b:nHeight
oPrint:Line( line, (oPrint:nHorzRes()*.55 ), line, (oPrint:nHorzRes()*.9792), oPen1 ) // bottom line ------------------------------
cText := "Total for Meals"
oPRINT:SAY ( LINE, (oPrint:nHorzRes()*.79), cText, oFONT10 )
nPrice := If(empty(oRsTrav:Fields("TMeals"):Value), 0.00, oRsTrav:Fields("TMeals"):Value )
Do Case
Case nPrice = 0
oPRINT:SAY ( LINE, (oPrint:nHorzRes()*.9238 ),Transform( nPrice, "999,999.99" ), oFONT10b )
Case nPrice > 0 .and. nPrice < 10
oPRINT:SAY ( LINE, (oPrint:nHorzRes()*.92 ),Transform( nPrice, "999,999.99" ), oFont10b )
Case nPrice >= 10 .and. nPrice < 100
oPRINT:SAY ( LINE, (oPrint:nHorzRes()*.92 ),Transform( nPrice, "999,999.99" ), oFont10b )
Case nPrice >= 100 .and. nPrice < 1000
oPRINT:SAY ( LINE, (oPrint:nHorzRes()*.915 ), Transform( nPrice, "999,999.99" ), oFont10b )
Case nPrice >= 1000 .and. nPrice < 10000
oPRINT:SAY ( LINE, (oPrint:nHorzRes()*.91), Transform( nPrice, "999,999.99" ), oFont10b )
Case nPrice >= 10000 .and. nPrice < 100000
oPRINT:SAY ( LINE, (oPrint:nHorzRes()*.90), Transform( nPrice, "999,999.99" ), oFont10b )
OtherWise
oPRINT:SAY ( LINE, (oPrint:nHorzRes()*.90), Transform( nPrice, "999,999.99" ), oFont10b )
EndCase
// recalc for Benefits comments
xLine := line
cText := oRsTrav:Fields("Benefits"):Value
If Empty(cText) .or. cText = " "
Else
Line += oFont14b:nHeight-200
cText := Alltrim( cText)
nLinCnt := MlCount( cText, 75 )
IF nLinCnt > 0
For x := 1 to nLinCnt
yText := MemoLine( cText, 75, x )
oPRINT:SAY ( LINE, (oPrint:nHorzRes()*.12 ), yText, oFONT8 )
Line += oFont8:nHeight
Next
Endif
Endif
Line := xLine
Line += oFont10b:nHeight
Line += oFont10b:nHeight
cText := "Cont Ed Credits going to be Obtained (Y/N)?"
oPRINT:SAY ( LINE, (oPrint:nHorzRes()*.02), cText, oFONT10 )
cText := If(empty(oRsTrav:Fields("ContEdCr"):Value), "N", oRsTrav:Fields("ContEdCr"):Value )
oPRINT:SAY ( LINE, (oPrint:nHorzRes()*.37), cText, oFONT10b )
Line += oFont10b:nHeight
cText := "If YES, How Many ?"
oPRINT:SAY ( LINE, (oPrint:nHorzRes()*.02), cText, oFONT10 )
cText := If(empty(oRsTrav:Fields("HowMany"):Value), 0, oRsTrav:Fields("HowMany"):Value )
cText := Transform( cText,"999" )
oPRINT:SAY ( LINE, (oPrint:nHorzRes()*.364), cText, oFONT10b )
Line += oFont10b:nHeight
cText := "Are you making a Speach or Presentation (Y/N) ?"
oPRINT:SAY ( LINE, (oPrint:nHorzRes()*.02), cText, oFONT10 )
cText := If(empty(oRsTrav:Fields("Speach"):Value), "N", oRsTrav:Fields("Speach"):Value )
oPRINT:SAY ( LINE, (oPrint:nHorzRes()*.37), cText, oFONT10b )
Line += oFont10b:nHeight
cText := "Hotel"
oPRINT:SAY ( LINE, (oPrint:nHorzRes()*.55), cText, oFONT10 )
nPrice := If(empty(oRsTrav:Fields("Nights"):Value), 0, oRsTrav:Fields("Nights"):Value )
Do Case
Case nPrice = 0
oPRINT:SAY ( LINE, (oPrint:nHorzRes()*.64 ), Transform( nPrice, "9,999" ), oFONT10b )
Case nPrice > 0 .and. nPrice < 10
oPRINT:SAY ( LINE, (oPrint:nHorzRes()*.64 ), Transform( nPrice, "9,999" ), oFont10b )
Case nPrice >= 10 .and. nPrice < 100
oPRINT:SAY ( LINE, (oPrint:nHorzRes()*.64 ), Transform( nPrice, "9,999" ), oFont10b )
Case nPrice >= 100 .and. nPrice < 1000
oPRINT:SAY ( LINE, (oPrint:nHorzRes()* .63 ), Transform( nPrice, "9,999" ), oFont10b ) //////
Case nPrice >= 1000 .and. nPrice < 10000
oPRINT:SAY ( LINE, (oPrint:nHorzRes()*.625 ), Transform( nPrice, "9,999" ), oFont10b )
Case nPrice >= 10000 .and. nPrice < 100000
oPRINT:SAY ( LINE, (oPrint:nHorzRes()*.625 ), Transform( nPrice, "99,999" ), oFont10b )
OtherWise
oPRINT:SAY ( LINE, (oPrint:nHorzRes()*.625 ), Transform( nPrice, "99,999" ), oFont10b )
EndCase
cText := "Nights @"
oPRINT:SAY ( LINE, (oPrint:nHorzRes()*.68), cText, oFONT10 )
nPrice := If(empty(oRsTrav:Fields("HCost"):Value), 0.00, oRsTrav:Fields("HCost"):Value )
// hotel cost
Do Case
Case nPrice = 0
oPRINT:SAY ( LINE, (oPrint:nHorzRes()*.77 ), Transform( nPrice, "9,999.99" ), oFONT10b )
Case nPrice > 0 .and. nPrice < 10
oPRINT:SAY ( LINE, (oPrint:nHorzRes()*.77 ), Transform( nPrice, "9,999.99" ), oFont10b ) /////
Case nPrice >= 10 .and. nPrice < 100
oPRINT:SAY ( LINE, (oPrint:nHorzRes()*.765 ), Transform( nPrice, "9,999.99" ), oFont10b )
Case nPrice >= 100 .and. nPrice < 1000
oPRINT:SAY ( LINE, (oPrint:nHorzRes()*.765), Transform( nPrice, "9,999.99" ), oFont10b )
Case nPrice >= 1000 .and. nPrice < 10000
oPRINT:SAY ( LINE, (oPrint:nHorzRes()*.62 ), Transform( nPrice, "9,999.99" ), oFont10b )
Case nPrice >= 10000 .and. nPrice < 100000
oPRINT:SAY ( LINE, (oPrint:nHorzRes()*.60 ), Transform( nPrice, "99,999.99" ), oFont10b )
OtherWise
oPRINT:SAY ( LINE, (oPrint:nHorzRes()*.60 ), Transform( nPrice, "99,999.99" ), oFont10b )
EndCase
// hotel total dollars
cText := "= $"
oPRINT:SAY ( LINE, (oPrint:nHorzRes()*.85 ), cText, oFONT10 )
nPrice := If(empty(oRsTrav:Fields("THotel"):Value), 0.00, oRsTrav:Fields("THotel"):Value )
Do Case
Case nPrice = 0
oPRINT:SAY ( LINE, (oPrint:nHorzRes()*.9238 ),Transform( nPrice, "999,999.99" ), oFONT10b )
Case nPrice > 0 .and. nPrice < 10
oPRINT:SAY ( LINE, (oPrint:nHorzRes()*.92 ),Transform( nPrice, "999,999.99" ), oFont10b )
Case nPrice >= 10 .and. nPrice < 100
oPRINT:SAY ( LINE, (oPrint:nHorzRes()*.917 ),Transform( nPrice, "999,999.99" ), oFont10b )
Case nPrice >= 100 .and. nPrice < 1000
oPRINT:SAY ( LINE, (oPrint:nHorzRes()*.915), Transform( nPrice, "999,999.99" ), oFont10b )
Case nPrice >= 1000 .and. nPrice < 10000
oPRINT:SAY ( LINE, (oPrint:nHorzRes()*.91), Transform( nPrice, "999,999.99" ), oFont10b )
Case nPrice >= 10000 .and. nPrice < 100000
oPRINT:SAY ( LINE, (oPrint:nHorzRes()*.90), Transform( nPrice, "999,999.99" ), oFont10b )
OtherWise
oPRINT:SAY ( LINE, (oPrint:nHorzRes()*.90), Transform( nPrice, "999,999.99" ), oFont10b )
EndCase
Line += oFont10b:nHeight
cText := "Type of Training (Y/N)?"
oPRINT:SAY ( LINE, (oPrint:nHorzRes()*.02), cText, oFONT10 )
cText := "Mileage"
oPRINT:SAY ( LINE, (oPrint:nHorzRes()*.55), cText, oFONT10 )
// number of miles driven
nPrice := If(empty(oRsTrav:Fields("NumMiles"):Value), 0.000, oRsTrav:Fields("NumMiles"):Value )
Do Case
Case nPrice = 0
oPRINT:SAY ( LINE, (oPrint:nHorzRes()*.635 ), Transform( nPrice, "99,999" ), oFONT10b )
Case nPrice > 0 .and. nPrice < 10
oPRINT:SAY ( LINE, (oPrint:nHorzRes()*.635 ), Transform( nPrice, "99,999" ), oFont10b )
Case nPrice >= 10 .and. nPrice < 100
oPRINT:SAY ( LINE, (oPrint:nHorzRes()*.633 ), Transform( nPrice, "99,999" ), oFont10b ) ////
Case nPrice >= 100 .and. nPrice < 1000
oPRINT:SAY ( LINE, (oPrint:nHorzRes()* .626 ), Transform( nPrice, "99,999" ), oFont10b ) //////
Case nPrice >= 1000 .and. nPrice < 10000
oPRINT:SAY ( LINE, (oPrint:nHorzRes()*.625 ), Transform( nPrice, "9,999" ), oFont10b )
Case nPrice >= 10000 .and. nPrice < 100000
oPRINT:SAY ( LINE, (oPrint:nHorzRes()*.625 ), Transform( nPrice, "99,999" ), oFont10b )
OtherWise
oPRINT:SAY ( LINE, (oPrint:nHorzRes()*.625 ), Transform( nPrice, "99,999" ), oFont10b )
EndCase
cText := "Miles @"
oPRINT:SAY ( LINE, (oPrint:nHorzRes()*.68), cText, oFONT10 )
nPrice := If(empty(oRsTrav:Fields("MRate"):Value), 0.000, oRsTrav:Fields("MRate"):Value )
// mileage rate
oPRINT:SAY ( LINE, (oPrint:nHorzRes()*.778 ), Transform( nPrice, "9.999" ), oFONT10b )
cText := "= $"
oPRINT:SAY ( LINE, (oPrint:nHorzRes()*.85 ), cText, oFONT10 )
// mileage total
nPrice := If(empty(oRsTrav:Fields("TMileage"):Value), 0.00, oRsTrav:Fields("TMileage"):Value )
Do Case
Case nPrice = 0
oPRINT:SAY ( LINE, (oPrint:nHorzRes()*.9238 ),Transform( nPrice, "999,999.99" ), oFONT10b )
Case nPrice > 0 .and. nPrice < 10
oPRINT:SAY ( LINE, (oPrint:nHorzRes()*.92 ),Transform( nPrice, "999,999.99" ), oFont10b )
Case nPrice >= 10 .and. nPrice < 100
oPRINT:SAY ( LINE, (oPrint:nHorzRes()*.92 ),Transform( nPrice, "999,999.99" ), oFont10b )
Case nPrice >= 100 .and. nPrice < 1000
oPRINT:SAY ( LINE, (oPrint:nHorzRes()*.915 ), Transform( nPrice, "999,999.99" ), oFont10b )
Case nPrice >= 1000 .and. nPrice < 10000
oPRINT:SAY ( LINE, (oPrint:nHorzRes()*.91), Transform( nPrice, "999,999.99" ), oFont10b )
Case nPrice >= 10000 .and. nPrice < 100000
oPRINT:SAY ( LINE, (oPrint:nHorzRes()*.90), Transform( nPrice, "999,999.99" ), oFont10b )
OtherWise
oPRINT:SAY ( LINE, (oPrint:nHorzRes()*.90), Transform( nPrice, "999,999.99" ), oFont10b )
EndCase
cTrainTp1 := if(empty(oRsTrav:Fields("TrainTp1"):Value),space(25), substr(oRsTrav:Fields("TrainTp1"):Value+space(25),1,25))
cTrainTp2 := if(empty(oRsTrav:Fields("TrainTp2"):Value),space(25), substr(oRsTrav:Fields("TrainTp2"):Value+space(25),1,25))
cTrainTp3 := if(empty(oRsTrav:Fields("TrainTp3"):Value),space(25), substr(oRsTrav:Fields("TrainTp3"):Value+space(25),1,25))
cTrainTp4 := if(empty(oRsTrav:Fields("TrainTp4"):Value),space(25), substr(oRsTrav:Fields("TrainTp4"):Value+space(25),1,25))
cTrainTp5 := if(empty(oRsTrav:Fields("TrainTp5"):Value),space(25), substr(oRsTrav:Fields("TrainTp5"):Value+space(25),1,25))
cTrainTp6 := if(empty(oRsTrav:Fields("TrainTp6"):Value),space(25), substr(oRsTrav:Fields("TrainTp6"):Value+space(25),1,25))
Line += oFont10b:nHeight
cText := If(empty(oRsTrav:Fields("Quality"):Value), "N", oRsTrav:Fields("Quality"):Value )
oPRINT:SAY ( LINE, (oPrint:nHorzRes()*.02), cText, oFONT10b )
cText := cTrainTp1
oPRINT:SAY ( LINE, (oPrint:nHorzRes()*.05), cText, oFONT10 )
oPrint:Line( line, (oPrint:nHorzRes()*.02 ), line, (oPrint:nHorzRes()*.45 ), oPen1 ) // line
cText := If(empty(oRsTrav:Fields("ExamTrav"):Value), "N", oRsTrav:Fields("ExamTrav"):Value )
oPRINT:SAY ( LINE, (oPrint:nHorzRes()*.23), cText, oFONT10b )
cText := cTrainTp4
oPRINT:SAY ( LINE, (oPrint:nHorzRes()*.26 ), cText, oFONT10 ) /////////////////
cText := "Registration or Course Cost"
oPRINT:SAY ( LINE, (oPrint:nHorzRes()*.55), cText, oFONT10 )
nPrice := If(empty(oRsTrav:Fields("Regist"):Value), 0.00, oRsTrav:Fields("Regist"):Value )
Do Case
Case nPrice = 0
oPRINT:SAY ( LINE, (oPrint:nHorzRes()* .9238 ),Transform( nPrice, "999,999.99" ), oFONT10b )
Case nPrice > 0 .and. nPrice < 10
oPRINT:SAY ( LINE, (oPrint:nHorzRes()*.92 ),Transform( nPrice, "999,999.99" ), oFont10b )
Case nPrice >= 10 .and. nPrice < 100
oPRINT:SAY ( LINE, (oPrint:nHorzRes()*.917 ),Transform( nPrice, "999,999.99" ), oFont10b )
Case nPrice >= 100 .and. nPrice < 1000
oPRINT:SAY ( LINE, (oPrint:nHorzRes()*.915), Transform( nPrice, "999,999.99" ), oFont10b )
Case nPrice >= 1000 .and. nPrice < 10000
oPRINT:SAY ( LINE, (oPrint:nHorzRes()*.91), Transform( nPrice, "999,999.99" ), oFont10b )
Case nPrice >= 10000 .and. nPrice < 100000
oPRINT:SAY ( LINE, (oPrint:nHorzRes()*.90), Transform( nPrice, "999,999.99" ), oFont10b )
OtherWise
oPRINT:SAY ( LINE, (oPrint:nHorzRes()*.90), Transform( nPrice, "999,999.99" ), oFont10b )
EndCase
Line += oFont10b:nHeight
cText := If(empty(oRsTrav:Fields("Mgmt"):Value), "N", oRsTrav:Fields("Mgmt"):Value )
oPRINT:SAY ( LINE, (oPrint:nHorzRes()*.02), cText, oFONT10b )
cText := cTrainTp2
oPRINT:SAY ( LINE, (oPrint:nHorzRes()*.05), cText, oFONT10 )
cText := If(empty(oRsTrav:Fields("ProDev"):Value), "N", oRsTrav:Fields("ProDev"):Value )
oPRINT:SAY ( LINE, (oPrint:nHorzRes()*.23), cText, oFONT10b )
cText := cTrainTp5
oPRINT:SAY ( LINE, (oPrint:nHorzRes()*.26 ), cText, oFONT10 )
cText := "Airfare"
oPRINT:SAY ( LINE, (oPrint:nHorzRes()*.55), cText, oFONT10 )
nPrice := If(empty(oRsTrav:Fields("Airfare"):Value), 0.00, oRsTrav:Fields("Airfare"):Value )
Do Case
Case nPrice = 0
oPRINT:SAY ( LINE, (oPrint:nHorzRes()* .9238 ),Transform( nPrice, "999,999.99" ), oFONT10b )
Case nPrice > 0 .and. nPrice < 10
oPRINT:SAY ( LINE, (oPrint:nHorzRes()*.92 ),Transform( nPrice, "999,999.99" ), oFont10b )
Case nPrice >= 10 .and. nPrice < 100
oPRINT:SAY ( LINE, (oPrint:nHorzRes()*.917 ),Transform( nPrice, "999,999.99" ), oFont10b )
Case nPrice >= 100 .and. nPrice < 1000
oPRINT:SAY ( LINE, (oPrint:nHorzRes()*.915), Transform( nPrice, "999,999.99" ), oFont10b )
Case nPrice >= 1000 .and. nPrice < 10000
oPRINT:SAY ( LINE, (oPrint:nHorzRes()*.91), Transform( nPrice, "999,999.99" ), oFont10b )
Case nPrice >= 10000 .and. nPrice < 100000
oPRINT:SAY ( LINE, (oPrint:nHorzRes()*.90), Transform( nPrice, "999,999.99" ), oFont10b )
OtherWise
oPRINT:SAY ( LINE, (oPrint:nHorzRes()*.90), Transform( nPrice, "999,999.99" ), oFont10b )
EndCase
Line += oFont10b:nHeight
cText := If(empty(oRsTrav:Fields("Tech"):Value), "N", oRsTrav:Fields("Tech"):Value )
oPRINT:SAY ( LINE, (oPrint:nHorzRes()*.02), cText, oFONT10b )
cText := cTrainTp3
oPRINT:SAY ( LINE, (oPrint:nHorzRes()*.05), cText, oFONT10 )
cText := If(empty(oRsTrav:Fields("Conf"):Value), "N", oRsTrav:Fields("Conf"):Value )
oPRINT:SAY ( LINE, (oPrint:nHorzRes()*.23), cText, oFONT10b )
cText := cTrainTp6
oPRINT:SAY ( LINE, (oPrint:nHorzRes()*.26 ), cText, oFONT10 )
cText := "Misc, Other, Baggage"
oPRINT:SAY ( LINE, (oPrint:nHorzRes()*.55), cText, oFONT10 )
nPrice := If(empty(oRsTrav:Fields("MiscCost"):Value), 0.00, oRsTrav:Fields("MiscCost"):Value )
Do Case
Case nPrice = 0
oPRINT:SAY ( LINE, (oPrint:nHorzRes()* .9238 ),Transform( nPrice, "999,999.99" ), oFONT10b )
Case nPrice > 0 .and. nPrice < 10
oPRINT:SAY ( LINE, (oPrint:nHorzRes()*.92 ),Transform( nPrice, "999,999.99" ), oFont10b )
Case nPrice >= 10 .and. nPrice < 100
oPRINT:SAY ( LINE, (oPrint:nHorzRes()*.918 ),Transform( nPrice, "999,999.99" ), oFont10b )
Case nPrice >= 100 .and. nPrice < 1000
oPRINT:SAY ( LINE, (oPrint:nHorzRes()*.915), Transform( nPrice, "999,999.99" ), oFont10b )
Case nPrice >= 1000 .and. nPrice < 10000
oPRINT:SAY ( LINE, (oPrint:nHorzRes()*.91), Transform( nPrice, "999,999.99" ), oFont10b )
Case nPrice >= 10000 .and. nPrice < 100000
oPRINT:SAY ( LINE, (oPrint:nHorzRes()*.90), Transform( nPrice, "999,999.99" ), oFont10b )
OtherWise
oPRINT:SAY ( LINE, (oPrint:nHorzRes()*.90), Transform( nPrice, "999,999.99" ), oFont10b )
EndCase
Line += oFont10b:nHeight
Line += oFont10b:nHeight
oPrint:Line( line, (oPrint:nHorzRes()*.55 ), line, (oPrint:nHorzRes()*.9792), oPen1 ) // bottom expense line
cText := "Grand Total"
oPRINT:SAY ( LINE, (oPrint:nHorzRes()*.80), cText, oFONT10 )
nPrice := If(empty(oRsTrav:Fields("GrandTot"):Value), 0.00, oRsTrav:Fields("GrandTot"):Value )
Do Case
Case nPrice = 0
oPRINT:SAY ( LINE, (oPrint:nHorzRes()* .9238 ),Transform( nPrice, "999,999.99" ), oFONT10b )
Case nPrice > 0 .and. nPrice < 10
oPRINT:SAY ( LINE, (oPrint:nHorzRes()*.92 ),Transform( nPrice, "999,999.99" ), oFont10b )
Case nPrice >= 10 .and. nPrice < 100
oPRINT:SAY ( LINE, (oPrint:nHorzRes()*.918 ),Transform( nPrice, "999,999.99" ), oFont10b )
Case nPrice >= 100 .and. nPrice < 1000
oPRINT:SAY ( LINE, (oPrint:nHorzRes()*.915), Transform( nPrice, "999,999.99" ), oFont10b )
Case nPrice >= 1000 .and. nPrice < 10000
oPRINT:SAY ( LINE, (oPrint:nHorzRes()*.91), Transform( nPrice, "999,999.99" ), oFont10b )
Case nPrice >= 10000 .and. nPrice < 100000
oPRINT:SAY ( LINE, (oPrint:nHorzRes()*.90), Transform( nPrice, "999,999.99" ), oFont10b )
OtherWise
oPRINT:SAY ( LINE, (oPrint:nHorzRes()*.90), Transform( nPrice, "999,999.99" ), oFont10b )
EndCase
xLine := line
Line += oFont10b:nHeight-5
cText := "========="
oPRINT:SAY ( LINE, (oPrint:nHorzRes()*.90), cText, oFONT10 )
Line := xLine
*Line += oFont10b:nHeight
Line += oFont10b:nHeight
cText := "What knowledge transfer activity will be Completed ( Y/N )"
oPRINT:SAY ( LINE, (oPrint:nHorzRes()*.02), cText, oFONT10 )
Line += oFont10b:nHeight
cText := "For All that Apply"
oPRINT:SAY ( LINE, (oPrint:nHorzRes()*.02), cText, oFONT10 )
Line += oFont10b:nHeight
cText := If(empty(oRsTrav:Fields("OverView"):Value), "N", oRsTrav:Fields("OverView"):Value )
oPRINT:SAY ( LINE, (oPrint:nHorzRes()*.02), cText, oFONT10b )
cText := "Written Overview of Event and ( key Take Aways )"
oPRINT:SAY ( LINE, (oPrint:nHorzRes()*.05), cText, oFONT10 )
oPrint:Line( line, (oPrint:nHorzRes()*.02 ), line, (oPrint:nHorzRes()*.45 ), oPen1 ) // line
cText := "Manager Approval"
oPRINT:SAY ( LINE, (oPrint:nHorzRes()*.55), cText, oFONT10 )
cText := "Date"
oPRINT:SAY ( LINE, (oPrint:nHorzRes()*.78), cText, oFONT10 )
cText := "Approved(Y/N)"
oPRINT:SAY ( LINE, (oPrint:nHorzRes()*.87), cText, oFONT10 )
Line += oFont10b:nHeight
oPrint:Line( line, (oPrint:nHorzRes()*.55 ), line, (oPrint:nHorzRes()*.9792), oPen1 )
cText := If(empty(oRsTrav:Fields("LunchLrn"):Value), "N", oRsTrav:Fields("LunchLrn"):Value )
oPRINT:SAY ( LINE, (oPrint:nHorzRes()*.02), cText, oFONT10b )
cText := "Lunch and Learn Presented or afforded to DOI"
oPRINT:SAY ( LINE, (oPrint:nHorzRes()*.05), cText, oFONT10 )
cText := If(empty(oRsTrav:Fields("Mgr1"):Value), " ", UpperLower(oRsTrav:Fields("Mgr1"):Value ))
oPRINT:SAY ( LINE, (oPrint:nHorzRes()*.55), cText, oFONT10b )
dDate := If(empty(oRsTrav:Fields("Mgr1Date"):Value),ctod("00/00/00"),;
TtoDate(oRsTrav:Fields("Mgr1Date"):Value))
cText := dtoc(dDate)
oPRINT:SAY ( LINE, (oPrint:nHorzRes()*.78), cText, oFONT10b )
cText := If( empty(oRsTrav:Fields("Mgr1Yes"):Value), " ", oRsTrav:Fields("Mgr1Yes"):Value )
oPRINT:SAY ( LINE, (oPrint:nHorzRes()*.92), cText, oFONT10b )
Line += oFont10b:nHeight
oPrint:Line( line, (oPrint:nHorzRes()*.55 ), line, (oPrint:nHorzRes()*.9792), oPen1 )
cText := If(empty(oRsTrav:Fields("OtherTBD"):Value), "N", oRsTrav:Fields("OtherTBD"):Value )
oPRINT:SAY ( LINE, (oPrint:nHorzRes()*.02), cText, oFONT10b )
cText := "Other ( TBD upon consultation with Supervisor"
oPRINT:SAY ( LINE, (oPrint:nHorzRes()*.05), cText, oFONT10 )
cText := If(empty(oRsTrav:Fields("Mgr2"):Value), " ", UpperLower(oRsTrav:Fields("Mgr2"):Value ))
oPRINT:SAY ( LINE, (oPrint:nHorzRes()*.55), cText, oFONT10b )
dDate := If(empty(oRsTrav:Fields("Mgr2Date"):Value),ctod("00/00/00"),;
TtoDate(oRsTrav:Fields("Mgr2Date"):Value))
cText := dtoc(dDate)
oPRINT:SAY ( LINE, (oPrint:nHorzRes()*.78), cText, oFONT10b )
cText := If( empty(oRsTrav:Fields("Mgr2Yes"):Value), " ", oRsTrav:Fields("Mgr2Yes"):Value )
oPRINT:SAY ( LINE, (oPrint:nHorzRes()*.92), cText, oFONT10b )
Line += oFont10b:nHeight
oPrint:Line( line, (oPrint:nHorzRes()*.55 ), line, (oPrint:nHorzRes()*.9792), oPen1 )
cText := If(empty(oRsTrav:Fields("NotApp"):Value), "N", oRsTrav:Fields("NotApp"):Value )
oPRINT:SAY ( LINE, (oPrint:nHorzRes()*.02), cText, oFONT10b )
cText := "None or Not Applicable"
oPRINT:SAY ( LINE, (oPrint:nHorzRes()*.05), cText, oFONT10 )
cText := If(empty(oRsTrav:Fields("Mgr3"):Value), " ", UpperLower(oRsTrav:Fields("Mgr3"):Value) )
oPRINT:SAY ( LINE, (oPrint:nHorzRes()*.55), cText, oFONT10b )
dDate := If(empty(oRsTrav:Fields("Mgr3Date"):Value),ctod("00/00/00"),;
TtoDate(oRsTrav:Fields("Mgr3Date"):Value))
cText := dtoc(dDate)
oPRINT:SAY ( LINE, (oPrint:nHorzRes()*.78), cText, oFONT10b )
Line += oFont10b:nHeight
oPrint:Line( line, (oPrint:nHorzRes()*.55 ), line, (oPrint:nHorzRes()*.9792), oPen1 )
cText := If(empty(oRsTrav:Fields("Mgr4"):Value), " ", UpperLower(oRsTrav:Fields("Mgr4"):Value) )
oPRINT:SAY ( LINE, (oPrint:nHorzRes()*.55), cText, oFONT10b )
dDate := If(empty(oRsTrav:Fields("Mgr4Date"):Value),ctod("00/00/00"),;
TtoDate(oRsTrav:Fields("Mgr4Date"):Value))
cText := dtoc(dDate)
oPRINT:SAY ( LINE, (oPrint:nHorzRes()*.78), cText, oFONT10b )
Line += oFont10b:nHeight
oPrint:Line( line, (oPrint:nHorzRes()*.55 ), line, (oPrint:nHorzRes()*.9792), oPen1 )
Line += oFont10b:nHeight
cText := "Fiscal Yr"
oPRINT:SAY ( LINE, (oPrint:nHorzRes()*.02), cText, oFONT10 )
cText := "Amount"
oPRINT:SAY ( LINE, (oPrint:nHorzRes()*.19), cText, oFONT10 )
cText := "Continuing Ed Hours"
oPRINT:SAY ( LINE, (oPrint:nHorzRes()*.30), cText, oFONT10 )
Line += oFont10b:nHeight
oPrint:Line( line, (oPrint:nHorzRes()*.02 ), line, (oPrint:nHorzRes()*.45 ), oPen1 )
xLine := Line // .38 1.70 .81
oPrint:Box( line, (oPrint:nHorzRes()* .60 ), Line* 1.15, (oPrint:nHorzRes()*.98 ), oPen1 )
cText := oRsTrav:Fields("Comments"):Value // rejection
If Empty(cText) .or. cText = " "
Else
cText := Alltrim( cText)
nLinCnt := MlCount( cText, 65 )
IF nLinCnt > 0
For x := 1 to nLinCnt
yText := MemoLine( cText, 65, x )
oPRINT:SAY ( LINE, (oPrint:nHorzRes()*.61 ), yText, oFONT8 )
Line += oFont8:nHeight
Next
Endif
Endif
Line := xLine
cText := If(empty(oRsTrav:Fields("CurrFY"):Value), " ", oRsTrav:Fields("CurrFy"):Value )
oPRINT:SAY ( LINE, (oPrint:nHorzRes()*.02), cText, oFONT10 )
nPrice := If(empty(oRsTrav:Fields("CurrCont"):Value), 0.00, oRsTrav:Fields("CurrCont"):Value )
Do Case
Case nPrice = 0
oPRINT:SAY ( LINE, (oPrint:nHorzRes()*.19 ),Transform( nPrice, "999,999.99" ), oFONT10b )
Case nPrice > 0 .and. nPrice < 10
oPRINT:SAY ( LINE, (oPrint:nHorzRes()*.19 ),Transform( nPrice, "999,999.99" ), oFont10b )
Case nPrice >= 10 .and. nPrice < 100
oPRINT:SAY ( LINE, (oPrint:nHorzRes()*.185 ),Transform( nPrice, "999,999.99" ), oFont10b )
Case nPrice >= 100 .and. nPrice < 1000
oPRINT:SAY ( LINE, (oPrint:nHorzRes()*.181), Transform( nPrice, "999,999.99" ), oFont10b )
Case nPrice >= 1000 .and. nPrice < 10000
oPRINT:SAY ( LINE, (oPrint:nHorzRes()*.178), Transform( nPrice, "999,999.99" ), oFont10b )
Case nPrice >= 10000 .and. nPrice < 100000
oPRINT:SAY ( LINE, (oPrint:nHorzRes()*.173), Transform( nPrice, "999,999.99" ), oFont10b )
OtherWise
oPRINT:SAY ( LINE, (oPrint:nHorzRes()*.19), Transform( nPrice, "999,999.99" ), oFont10b )
EndCase
nPrice := If(empty(oRsTrav:Fields("CurrHrs"):Value), 0, oRsTrav:Fields("CurrHrs"):Value )
Do Case
Case nPrice = 0
oPRINT:SAY ( LINE, (oPrint:nHorzRes()*.353 ),Transform( nPrice, "999,999" ), oFONT10b )
Case nPrice > 0 .and. nPrice < 10
oPRINT:SAY ( LINE, (oPrint:nHorzRes()*.353 ),Transform( nPrice, "999,999" ), oFont10b )
Case nPrice >= 10 .and. nPrice < 100
oPRINT:SAY ( LINE, (oPrint:nHorzRes()*.350 ),Transform( nPrice, "999,999" ), oFont10b )
Case nPrice >= 100 .and. nPrice < 1000
oPRINT:SAY ( LINE, (oPrint:nHorzRes()*.345), Transform( nPrice, "999,999" ), oFont10b )
Case nPrice >= 1000 .and. nPrice < 10000
oPRINT:SAY ( LINE, (oPrint:nHorzRes()*.342), Transform( nPrice, "999,999" ), oFont10b )
Case nPrice >= 10000 .and. nPrice < 100000
oPRINT:SAY ( LINE, (oPrint:nHorzRes()*.338), Transform( nPrice, "999,999" ), oFont10b )
OtherWise
oPRINT:SAY ( LINE, (oPrint:nHorzRes()*.19), Transform( nPrice, "999,999" ), oFont10b )
EndCase
Line += oFont10b:nHeight
cText := If(empty(oRsTrav:Fields("PrevFY"):Value), " ", oRsTrav:Fields("PrevFy"):Value )
oPRINT:SAY ( LINE, (oPrint:nHorzRes()*.02), cText, oFONT10 )
nPrice := If(empty(oRsTrav:Fields("PrevCont"):Value), 0.00, oRsTrav:Fields("PrevCont"):Value )
Do Case
Case nPrice = 0
oPRINT:SAY ( LINE, (oPrint:nHorzRes()*.19 ),Transform( nPrice, "999,999.99" ), oFONT10b )
Case nPrice > 0 .and. nPrice < 10
oPRINT:SAY ( LINE, (oPrint:nHorzRes()*.19 ),Transform( nPrice, "999,999.99" ), oFont10b )
Case nPrice >= 10 .and. nPrice < 100
oPRINT:SAY ( LINE, (oPrint:nHorzRes()*.185 ),Transform( nPrice, "999,999.99" ), oFont10b )
Case nPrice >= 100 .and. nPrice < 1000
oPRINT:SAY ( LINE, (oPrint:nHorzRes()*.181), Transform( nPrice, "999,999.99" ), oFont10b )
Case nPrice >= 1000 .and. nPrice < 10000
oPRINT:SAY ( LINE, (oPrint:nHorzRes()*.178), Transform( nPrice, "999,999.99" ), oFont10b )
Case nPrice >= 10000 .and. nPrice < 100000
oPRINT:SAY ( LINE, (oPrint:nHorzRes()*.173), Transform( nPrice, "999,999.99" ), oFont10b )
OtherWise
oPRINT:SAY ( LINE, (oPrint:nHorzRes()*.19), Transform( nPrice, "999,999.99" ), oFont10b )
EndCase
nPrice := If(empty(oRsTrav:Fields("PrevHrs"):Value), 0, oRsTrav:Fields("PrevHrs"):Value )
Do Case
Case nPrice = 0
oPRINT:SAY ( LINE, (oPrint:nHorzRes()*.353 ),Transform( nPrice, "999,999" ), oFONT10b )
Case nPrice > 0 .and. nPrice < 10
oPRINT:SAY ( LINE, (oPrint:nHorzRes()*.353 ),Transform( nPrice, "999,999" ), oFont10b )
Case nPrice >= 10 .and. nPrice < 100
oPRINT:SAY ( LINE, (oPrint:nHorzRes()*.350 ),Transform( nPrice, "999,999" ), oFont10b )
Case nPrice >= 100 .and. nPrice < 1000
oPRINT:SAY ( LINE, (oPrint:nHorzRes()*.345), Transform( nPrice, "999,999" ), oFont10b )
Case nPrice >= 1000 .and. nPrice < 10000
oPRINT:SAY ( LINE, (oPrint:nHorzRes()*.342), Transform( nPrice, "999,999" ), oFont10b )
Case nPrice >= 10000 .and. nPrice < 100000
oPRINT:SAY ( LINE, (oPrint:nHorzRes()*.338), Transform( nPrice, "999,999" ), oFont10b )
OtherWise
oPRINT:SAY ( LINE, (oPrint:nHorzRes()*.19), Transform( nPrice, "999,999" ), oFont10b )
EndCase
cText := "Rejection"
oPRINT:SAY ( LINE, (oPrint:nHorzRes()*.50), cText, oFont10 )
Line += oFont10b:nHeight
cText := "Comments"
oPRINT:SAY ( LINE, (oPrint:nHorzRes()*.50), cText, oFont10 )
*Line += oFont10b:nHeight
Line += oFont10b:nHeight
Line += oFont10b:nHeight
Line += oFont10b:nHeight
oPrint:Line( line, (oPrint:nHorzRes()*.02 ), line, (oPrint:nHorzRes()*.45 ), oPen1 )
Line += oFont10b:nHeight
cText := "Created By"
oPRINT:SAY ( LINE, (oPrint:nHorzRes()*.02), cText, oFont10 )
dDate := If(empty(oRsTrav:Fields("CreateDt"):Value),ctod("00/00/00"),;
TtoDate(oRsTrav:Fields("CreateDt"):Value))
cText := dtoc(dDate)
oPRINT:SAY ( LINE, (oPrint:nHorzRes()*.169), cText, oFONT10b )
cText := "Fiscal Year"
oPRINT:SAY ( LINE, (oPrint:nHorzRes()*.33), cText, oFONT10 )
Line += oFont10b:nHeight
cText := If(empty(oRsTrav:Fields("CreateBy"):Value), " ", oRsTrav:Fields("CreateBy"):Value )
oPRINT:SAY ( LINE, (oPrint:nHorzRes()*.169), lower(cText), oFONT10b )
cText := If(empty(oRsTrav:Fields("FiscalYr"):Value), " ", oRsTrav:Fields("FiscalYr"):Value )
oPRINT:SAY ( LINE, (oPrint:nHorzRes()*.35), cText, oFONT10b )
cText := "Final Close Info :"
oPRINT:SAY ( LINE, (oPrint:nHorzRes()*.60), cText, oFONT10 )
cText := If(empty(oRsTrav:Fields("Fanswer"):Value), " ", oRsTrav:Fields("Fanswer"):Value )
oPRINT:SAY ( LINE, (oPrint:nHorzRes()*.73), cText, oFONT10b )
dDate := If(empty(oRsTrav:Fields("FDate"):Value),ctod("00/00/00"),;
TtoDate(oRsTrav:Fields("FDate"):Value))
cText := dtoc(dDate)
oPRINT:SAY ( LINE, (oPrint:nHorzRes()*.85), cText, oFONT10b )
oPRINT:EndPage()
ENDPRINT
RELEASE FONT oFont8
RELEASE FONT oFont8b
RELEASE FONT oFont10
RELEASE FONT oFont10b
RELEASE FONT oFont10i
RELEASE FONT oFont12ib
RELEASE FONT oFont12b
RELEASE FONT oFont14b
RELEASE FONT oFont24b
RELEASE FONT oFont10d
RELEASE PEN oPen1
Try
oDLg:End()
Catch
ENd Try
Return(cEmail)
//-----------------
Static Func prntline( pLINE, oFont, nColStep, Line, oPrint )
LOCAL i,nCol
nCol := 0
FOR i = 1 to LEN(pLINE)
oPRINT:SAY ( LINE, nCOL, SUBSTR(pLINE,i,1) , oFont )
nCOL += nColStep
NEXT
*Line += nRowStep
RETURN(.T.)
// Generated by ResEdit 1.6.6
// Copyright (C) 2006-2015
// http://www.resedit.net
#include <windows.h>
#include <commctrl.h>
//#include "resource.h"
#ifndef WC_STATIC
#define WC_STATIC L"Static"
#endif
#ifndef MONTHCAL_CLASS
#define MONTHCAL_CLASS "SysMonthCal32"
#endif
#ifndef DATETIMEPICK_CLASS
#define DATETIMEPICK_CLASS "SysDateTimePick32"
#endif
//
// Dialog resources
//
LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
REQPRINT DIALOG 56, 31, 208, 218
STYLE DS_MODALFRAME | DS_SETFONT | WS_CAPTION | WS_POPUP
FONT 8, "Microsoft Sans Serif"
{
RADIOBUTTON " View", 139, 7, 73, 36, 12, 0, WS_EX_LEFT
RADIOBUTTON " Print", 140, 7, 88, 36, 12, 0, WS_EX_LEFT
CONTROL "&Ok", 111, "TBtnBmp", 0x50010020, 100, 161, 45, 25, 0x00000000
CONTROL "&Cancel", 112, "TBtnBmp", 0x50010020, 149, 161, 45, 25, 0x00000000
LTEXT "This Routine will Print or View this Travel Request", 128, 9, 16, 194, 25, SS_LEFT | SS_NOPREFIX, WS_EX_LEFT
EDITTEXT 120, 10, 130, 185, 15, 0, WS_EX_RIGHT
}
//------------------------------------
Func SolidWhite()
SetDlgGradient( { { 0.01,16777215,16777215 },{ 0.01,16777215,16777215 } })
Return(nil)
//------------------
Func LightGreyGrad()
SetDlgGradient( { { .50, nRGB( 216, 216, 216 ), nRGB( 255, 255, 255 ) } } )
Return(nil)
//--------------------------------
Func GreyButtonGrad()
// 2010 grey button skin
Local bGrad
bGrad := { | lInvert | If( ! lInvert, ;
{ { 1, nRGB( 255, 255, 255 ), nRGB( 207, 207, 207 ) } }, ;
{ { 1/3, nRGB( 255, 253, 222 ), nRGB( 255, 231, 151 ) }, ;
{ 2/3, nRGB( 255, 215, 84 ), nRGB( 255, 233, 162 ) } } ) }
Return( bGrad )
Return to FiveWin for Harbour/xHarbour
Users browsing this forum: Surasak and 65 guests