Clarion 11.1.13744 cannot set Report Font PROP with Report$?FEQ - Footer SUM zero

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

image

Compile under 11.0 and see the first detail gets the Font changes made with Report$?FEQ

image

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)

Here’s what I replied with on the NG:
I wonder if it’s getting interpreted as an implicit REAL. What if you
try separating the “Report” from the “$”?

Report $ ?String2{PROP:FontSize}=16

I tested with Report $ ?String and it failed the same way. The setting of PROP:Text and PROP:Right, Center works. I will test a few more PROPs

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

Edit:
Confirm works with Report$?Feq are PROP: Hide XPos YPos Width Height Prop:Color (background)
and previously: Prop:Text Right Center

Confirm fail: Prop:FontColor, Prop:FontStyle {Prop:Font,#}

So far only the PROP Font fails. I can see AnyScreen needed special code to deal with Fonts on the web client.

1 Like

The entire block does not work:

PROP:Font EQUATE(7C10H) ! array (4 values)
PROP:FontName EQUATE(7C10H) ! string, equivalent to PROP:Font[1]
PROP:FontSize EQUATE(7C11H) ! integer, equivalent to PROP:Font[2]
PROP:FontColor EQUATE(7C12H) ! integer, equivalent to PROP:Font[3]
PROP:FontStyle EQUATE(7C13H) ! integer, equivalent to PROP:Font[4]
PROP:FontCharSet EQUATE(7C14H) ! integer, equivalent to PROP:Font[5]
PROP:CPI EQUATE(7C15H) ! integer, equivalent to PROP:Font[6]

In C11.1 add PROP:CPI for AnyScreen ?

I wonder if Report$ ?FEQ {PROP:FontName}='Times New Roman' works in AnyScreen if someone will test?

Reported in PTTS 43201

I can confirm the Report$?Feq PROP:FontXxxx bug was fixed in 11.1.13758.

As noted in my first post if you need to workaround this in an earlier release you can change the code to use SETTARGET(Report) and not Report$.


A new Report bug was found that is in 11.1 both 13744 and 13758. The Page Footer does not work for SUM CNT AVE MIN MAX they all show zero. These work fine in BREAK Footers “Group Total” in screen capture. PTTS 43232.

ReportPageSUMzeroBug11.1.zip (2.8 KB)

Miro posted in sv.clarion.clarion11 on Aug 25 2021 that the Page Footer totals work when TALLY(),PAGE is used. I added a test and confirmed that SUM,CNT,AVE work in the PAGE Footer in 11.1. My prior code with RESET(Break) in the Page Footer would be odd because it would not reset on page. I got that code from the Help.

This is my Page Footer with TALLY and “PAGE” causes it to Reset each page:

FOOTER1       FOOTER,AT(1000,9688,6500,1000),USE(?FOOTER1)
            STRING(@n5),AT(156,167),CNT,USE(FooterBreak2_Count),RIGHT                  ,Tally(Detail) , PAGE 
            STRING('Detail CNT'),AT(729,167),USE(?FooterSTRING1:2)
            STRING('SUM Footer Total:'),AT(1583,167),USE(?FooterSTRING1:3)
            STRING(@N$11.2),AT(2885,167),SUM,USE(Pre:F1,, ?Pre:F1:2),RIGHT             ,Tally(Detail) , PAGE 
            STRING(@N9.2),AT(3917,167),AVE, USE(Pre:F1,, ?Pre:F1_Ave_FooterPage),RIGHT ,Tally(Detail) , PAGE 
            STRING(@N9.2),AT(4635,167),MIN, USE(Pre:F1,, ?Pre:F1_Min_FooterPage),RIGHT ,Tally(Detail) , PAGE 
            STRING(@N9.2),AT(5396,167),MAX, USE(Pre:F1,, ?Pre:F1_Max_FooterPage),RIGHT ,Tally(Detail) , PAGE 
            STRING('AVE'),AT(4396,427),USE(?FooterStringAVE)
            STRING('MIN'),AT(5146,427),USE(?FooterStringMIN)
            STRING('MAX'),AT(5865,427),USE(?FooterStringMAX)

ReportPageSUMzeroBug11.1_TallyWorks.zip (3.3 KB)