The attached code ( Reqprint1.txt ) has my logic for creating an un-attended .pdf that creates a Travel Request ... I pass the value of 3 to ReqPrint1 .... Func _ReqPrint1( nView,oDlg,oSay,cSay,oRsTrav ) .. see attached .Txt .. The values of the code are irrelevant .. Attached file TSHIREY2.pdf is the CORRECT resolution ( notice the difference in the file sizes ) and is the result I am looking for .. on certain machines .. TSHIREY.1.pdf for some reason is generated with the wrong resolution.
Question ... How is oPrinter object created in this code .. nView = 3
//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\"+cPdfName+".pdf" //<------- here
EndCase
....
....
Since there is no direct pointer to a Printer .. where is oPrinter getting its values ... In the attached program .. I evaluate oPrinter to get the Horizontal and vertical values :
nRowStep := oPrint:nVertRes() / 55 // pixel per line = 57.65 @ 55
nColStep := oPrint:nHorzRes() /130 // columns
I use these values to place the output in specific places within the above range .. and use font pixels to arrange the text in the way I want the lines to print .. I realize the attached code may be a bit complex without the data .. but please review the .pdf attachments ...
TSHIREY2.pdf is the CORRECT resolution and is the result I am looking for .. on certain machines ( however ) .. TSHIREY.1.pdf for some reason is generated with the wrong resolution... same code different computers ..
Let me know what you think .. this appears to be a .pdf resolution problem and I think the value of oPrint is the culprit. I am using FWH 2006.
Thanks
Rick Lipkin
- Code: Select all Expand view
// ReqPrint1.prg
#INCLUDE "FIVEWIN.CH"
Static lOk
//-------------------------------------------
// 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
Local dLeave,dReturn
Local cPdfName,cReplace
cEmail := oRsTrav:Fields("EmpEmail"):Value
if empty(cEmail)
cEmail := alltrim(xLogin)
Else
nStart := at( "@", cEmail )
cEmail := Substr(cEmail,1,nStart-1)
Endif
cPdfName := cEmail
dLeave :=If(empty(oRsTrav:Fields("Leave"):Value),ctod("00/00/00"),;
TtoDate(oRsTrav:Fields("Leave"):Value))
dReturn :=If(empty(oRsTrav:Fields("Return"):Value),ctod("00/00/00"),;
TtoDate(oRsTrav:Fields("Return"):Value))
cPdfName := cPdfName+"_"+dtoc(dLeave)+"_To_"+dtoc(dReturn)
cReplace := strtran(cPdfName,"/","-" )
cPdfName := cReplace
*msginfo( "cPdfName in Request "+cPdfName )
//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\"+cPdfName+".pdf"
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
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()
/*
Do Case
Case nView = 1 // view
oPRINT:Preview()
Case nView = 2
PrintEnd()
Case nView = 3
PRINT TO oPrint FILE "C:\DBTMP\RICK.PDF"
* FWSavePreviewToPDF( oPrint, "c:\dbtmp\Rick.pdf", .F. )
* SavePreviewToPDF( oPrint, "c:\dbtmp\Rick.pdf", .F. )
EndCase
*/
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.)
// end
Pictures of two .pdfs .. same code, different machines ...
Good resolution:
Bad resolution: