Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Anchor
KB-20230622-0201
KB-20230622-0201
KB-20230622-0201

Version

XFRX 22.4

Symptoms 

Some numbers contains letter a Z in all outputs.

Cause

  • Text field has source of data type number 
  • Seted to "Character" on Format page of text file properties
  • After changing to "Numeric" is sets "Blank if zero" too

In the case VFP store format mask to PICTURE column in the format "@Z 9....".

Workaround

Set data type to numeric in report designer

Hook object for fixing bug in XFRX#INIT

Code Block
loSession=EVALUATE([xfrx("XFRX#INIT")])

loHook=CREATEOBJECT("xfrxhook")
BINDEVENT(loSession, "setReportParams", loHook, "setReportParams")
loSession.ProcessReport(lcPath+"test2.frx")
UNBINDEVENTS(loSession)

DEFINE CLASS xfrxhook AS custom
   PROCEDURE setReportParams
      LPARAMETERS loo
      LOCAL m.liSele
      m.liSele=SELECT()
      SELECT UR_REPORT
      REPLACE FILLCHAR WITH "N", PICTURE WITH STRTRAN(PICTURE, "@ Z ", "@Z ") FOR OBJTYPE=8 AND FILLCHAR="NC" AND ATC("@ Z ", PICTURE)>0
      SELECT (m.liSele)
      RETURN
   ENDPROC
ENDDEFINE

Fix report

Code Block
USE "somereport.frx"
REPLACE FILLCHAR WITH "N" FOR OBJTYPE=8 AND FILLCHAR="C" AND ATC("@Z ", PICTURE)>0
USE