Access this solution immediately by signing up as a member of FoxproAnswers.com--it’s quick, easy, and secure. We will return you to this solution, unlocked, when you’re done.
I am trying to get full text justification into a vfp report.
I pasted some code but can't seem to find the library "system.vcx". I may have more questions after this is resolved, but at this point I have to find the library to get the report to run
DEFINE CLASS FullJustifyListener AS _ReportListener OF ;
ADDBS(HOME(1)) + "FFC\_ReportListener.VCX"
oGDIGraphics = NULL
DIMENSION aRecords[1]
* Doug Hennig - If ListenerType hasn't already been set, set it based on whether the report
* is being printed or previewed.
FUNCTION LOADREPORT
WITH THIS
DO CASE
CASE .LISTENERTYPE <> -1
CASE .COMMANDCLAUSES.PREVIEW
.LISTENERTYPE = 1
CASE .COMMANDCLAUSES.OutputTo = 1
.LISTENERTYPE = 0
ENDCASE
ENDWITH
DODEFAULT()
ENDFUNC
* Before we run the report, we need to Make sure that GdiPlusX
* was initialized, and create a new Graphics object
*!* FUNCTION BEFOREREPORT
*!* DODEFAULT()
*!* WITH This
*!* * Check if we already have the "System" object in "_Screen"
*!* IF NOT PEMSTATUS(_Screen,"System",5)
*!* DO LOCFILE("System.App")
*!* ENDIF
*!* .oGDIGraphics = _SCREEN.SYSTEM.Drawing.Graphics.New()
*!* .SetFRXDataSession() && switches to the FRX cursor's datasession
*!* DIMENSION .aRecords(RECCOUNT(), 13)
*!* SCAN FOR "<FJ>" $ UPPER(User)
*!* .aRecords(RECNO(), 13) = "FJ"
*!* ENDSCAN
*!* .ResetDataSession() && restores the datasession ID to the one the listener is in
*!* ENDWITH
*!* ENDFUNC
FUNCTION BEFOREREPORT
DODEFAULT()
WITH THIS
* Check if we already have the "System" object in "_Screen"
IF NOT PEMSTATUS(_SCREEN,"System",5)
DO LOCFILE("System.App")
* _SCREEN.ADDPROPERTY("System", NEWOBJECT("xfcSystem", LOCFILE("system.vcx")))
ENDIF
.oGDIGraphics = _SCREEN.SYSTEM.Drawing.Graphics.New()
.SetFRXDataSession()
DIMENSION .aRecords[reccount(), 13]
SCAN FOR "<FJ>" $ UPPER(USER)
.aRecords[recno(), 13] = "FJ"
ENDSCAN
.ResetDataSession()
ENDWITH
ENDFUNC
1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23: 24: 25: 26: 27: 28: 29: 30: 31: 32: 33: 34: 35: 36: 37: 38: 39: 40: 41: 42: 43: 44: 45: 46: 47: 48: 49: 50: 51: 52: 53: 54:
Access this solution immediately by signing up as a member of FoxproAnswers.com--it’s quick, easy, and secure. We will return you to this solution, unlocked, when you’re done.
Posted on 2009-10-19 at 09:57:11ID: 26263370
All comments and solutions are available to Premium Service Members only. Sign up to view the solution to this question. Already a member? Log in to view this solution.