I thought this should be a new topic and not appended to the Blog post
I can confirm in 11.1.13744 setting FONT properties as shown below using Report$FEQ
syntax does not work. It did work to set RIGHT or TEXT.
Report$?WhatTest{PROP:Text}='Test #1 with Report$?FEQ{{PROP}' !Works
Report$?String2{PROP:Right}=1 !works
Report$?String2{PROP:FontSize}=16 !fails
Report$?String2{PROP:FontName}='Times New Roman' !fails
Report$?String2{PROP:FontStyle}=FONT:Bold + FONT:italic !fails
It works to set them inside a SetTarget(Report) so there is a workaround. In templates I usually use the REPORT$ syntax so I don’t risk messing up SETTARGET in embed code.
SETTARGET(Report) !works
?String2{PROP:FontSize}=16
?String2{PROP:FontName}='Times New Roman'
?String2{PROP:FontStyle}=FONT:Regular + FONT:italic
?PropTestChange{PROP:FontSize}=16
11.1 shows that Fonts do NOT change
Compile under 11.0 and see the first detail gets the Font changes made with Report$?FEQ
Here is my report tester and attached it
PROGRAM !Report Test Framework by Carl Barnes
INCLUDE('PRNPROP.CLW')
MAP
END
!--The Stuff needed for Preview
PreviewQ QUEUE,PRE(PreQ)
FileName STRING(260)
END
!#2. >>>--Define your test data
String1 STRING('string1 string1')
String2 STRING('string2 string2')
!#3. >>>--Define your Report
Report REPORT,AT(1000,2000,6000,7000),FONT('Arial',10),PRE(RPT),THOUS
HEADER,AT(1000,1000,6000,1000),USE(?HEADER1)
STRING('Report Test Prop Font changes'),AT(208,94),USE(?Title),TRN,FONT(,,,FONT:bold)
END
Detail1 DETAIL,AT(0,0,6000,1146),USE(?Detail1)
STRING('What Test'),AT(167,10,,146),USE(?WhatTest),TRN,FONT(,8)
STRING(@s40),AT(167,292),USE(String1)
STRING(@s40),AT(2990,292,2729),USE(String2)
STRING('These changed to Times 16 by PROP'),AT(2990,10,1229,146),USE(?Fyi),TRN,FONT(,8)
STRING('I am Original in Arial 10'),AT(167,615),USE(?PropTestOrig)
STRING('Prop Font changed to Times 16?'),AT(2990,615,2729),USE(?PropTestChange)
LINE,AT(177,958,5490,0),USE(?LINE1)
END
FOOTER,AT(1000,9000,6000,1000),USE(?unnamed)
END
FORM,AT(1000,1000,6000,9000),USE(?FORM1)
END
END
TestHow BYTE
CODE
!--Create Report
OPEN(Report)
REPORT{PROP:Preview}=PreviewQ
Report$?Title{PROP:Text}=Report$?Title{PROP:Text} &' - Build ' & System{PROP:LibVersion,3}
!#4. >>>--Add your code to produce the report
Report$?WhatTest{PROP:Text}='Test #1 with Report$?FEQ{{PROP}' !Works
Report$?String2{PROP:Right}=1 !works
Report$?String2{PROP:FontSize}=16 !fails
Report$?String2{PROP:FontName}='Times New Roman' !fails
Report$?String2{PROP:FontStyle}=FONT:Bold + FONT:italic !fails
Report$?PropTestChange{PROP:FontSize}=16
Report$?PropTestChange{PROP:FontName}='Times New Roman'
PRINT(Rpt:Detail1)
SETTARGET(Report) !works
?WhatTest{PROP:Text}='Test #2 SetTarget(Report) ; ?FEQ{{PROP}'
?String2{PROP:Center}=1 !Try Center, works
?String2{PROP:FontSize}=16
?String2{PROP:FontName}='Times New Roman'
?String2{PROP:FontStyle}=FONT:Regular + FONT:italic
?PropTestChange{PROP:FontSize}=16
?PropTestChange{PROP:FontName}='Times New Roman'
SETTARGET()
PRINT(Rpt:Detail1)
!--Report done, prepare it for preview
ENDPAGE(Report)
! CLOSE(Report) loses files
!--Preview the report
DO ReportPreviewRtn
CLOSE(Report)
!----------------- Open Preview Window and display --------------------------
ReportPreviewRtn ROUTINE
DATA
PrintIt Bool
PreviewWindow WINDOW('Preview'),AT(,,495,332),FONT('Microsoft Sans Serif',8,,FONT:regular),SYSTEM,MAX,RESIZE,CENTER
LIST,AT(1,2,317,11),USE(?List:PreviewQ),VSCROLL,FONT(,10,,),DROP(10),FROM(PreviewQ)
BUTTON('&Print'),AT(332,1,41,11),USE(?PrintBtn)
IMAGE,AT(1,15),USE(?Image1),FULL,HVSCROLL
END
CODE
OPEN(PreviewWindow)
?List:PreviewQ{PROP:Selected}=1
?PrintBtn{PROP:Tip} = 'Print to ' & printer{PROPPRINT:Device}
ACCEPT
IF ACCEPTED()=?List:PreviewQ OR EVENT()=Event:OpenWindow
GET(PreviewQ,CHOICE(?List:PreviewQ))
?Image1{PROP:Text}=PreviewQ
DISPLAY
ELSIF ACCEPTED() = ?PrintBtn
PrintIt=True
BREAK
END
END
CLOSE(PreviewWindow)
IF PrintIt THEN REPORT{PROP:FlushPreview}=True.
exit
!from https://gist.github.com/CarlTBarnes
FontPropRptBug11_1.zip (2.7 KB)