The template changes need to be made to CrtAbcRpt.TPW and CrtClaRpt.TPW in C:\Clarion#\accessory\template\win. Legacy and ABC have identical DisplayProgress code.
To change the templates
- Close All APP’s
- Open CrtAbcRpt.TPW or CrtClaRpt.TPW in the Editor
- Find the
DisplayProgress ROUTINE
- Find the lines of code between
#IF(SUB(%ProgressOption,1,1)='P')and #IF(%ProgressOption='Spinner')
- See that your existing code matches my Original Code
- Replace it with my Changed Code below
- Save the TPW then open an APP with a CPCS Report to verify the changes
This is the Original Code from my V3 files:
DisplayProgress ROUTINE
...
#IF(SUB(%ProgressOption,1,1)='P')
IF PercentProgress <> Progress:Thermometer THEN
Progress:Thermometer = PercentProgress
DisplayProgress = True
END
#ENDIF
#IF(SUB(%ProgressOptionValue,1,1)='P')
?Progress:PctText{Prop:Text} = FORMAT(PercentProgress,@N3) & CPCS:ProgWinPctText
#IF(%MDIProgWin AND %MDIProgWinIcon AND %MDIProgWinIconizedProg)
IF PWinMinimized = True
ProgressWindow{PROP:TEXT} = ?Progress:PctText{Prop:Text}
END
#ENDIF
#ELSIF(SUB(%ProgressOptionValue,1,1)='R')
?Progress:PctText{Prop:Text} = RecordsProcessed & ' ' & CPCS:ProgWinRecText
DisplayProgress = True
#IF(%MDIProgWin AND %MDIProgWinIcon AND %MDIProgWinIconizedProg)
IF PWinMinimized = True
ProgressWindow{PROP:TEXT} = ?Progress:PctText{Prop:Text}
END
#ENDIF
#ENDIF
#IF(%ProgressOption='Spinner')
...
Below is the Changed Code changed to move window updates to be every 1% inside IF PercentProgress <> Progress:Thermometer THEN
DisplayProgress ROUTINE
...
#IF(SUB(%ProgressOption,1,1)='P')
IF PercentProgress <> Progress:Thermometer THEN
Progress:Thermometer = PercentProgress
DisplayProgress = True
#!11/17/25 CB set Percent or Records string here only every 1% of records
#CASE(SUB(%ProgressOptionValue,1,1)) #!11/17/25 CB
#OF('P')
?Progress:PctText{Prop:Text} = PercentProgress & CPCS:ProgWinPctText
#OF('R')
?Progress:PctText{Prop:Text} = RecordsProcessed &' '& CPCS:ProgWinRecText
#ENDCASE #!11/17/25 CB end new code
#!11/17/25 CB also move up the code to show progress in the window caption (when iconized) to only show every 1%
#IF(%MDIProgWin AND %MDIProgWinIcon AND %MDIProgWinIconizedProg)
IF PWinMinimized = True
ProgressWindow{PROP:TEXT} = ?Progress:PctText{Prop:Text}
END
#ENDIF
END
#ENDIF
#IF(SUB(%ProgressOptionValue,1,1)='P')
#!11/17/25 CB moved up: ?Progress:PctText{Prop:Text} = PercentProgress & CPCS:ProgWinPctText
#! #IF(%MDIProgWin AND %MDIProgWinIcon AND %MDIProgWinIconizedProg) 11/17/25 CB moved up
#! IF PWinMinimized = True
#! ProgressWindow{PROP:TEXT} = ?Progress:PctText{Prop:Text}
#! END
#! #ENDIF
#ELSIF(SUB(%ProgressOptionValue,1,1)='R')
#!11/17/25 CB moved up: ?Progress:PctText{Prop:Text} = RecordsProcessed & ' ' & CPCS:ProgWinRecText
#!11/17/25 CB bad idea: DisplayProgress = True
#! #IF(%MDIProgWin AND %MDIProgWinIcon AND %MDIProgWinIconizedProg)
#! IF PWinMinimized = True
#! ProgressWindow{PROP:TEXT} = ?Progress:PctText{Prop:Text}
#! END
#! #ENDIF
#ENDIF
#IF(%ProgressOption='Spinner')
...
FYI it may help to know some of variables from these template inputs:
#DISPLAY('Progress Indicator')
#PROMPT('',DROP('Progress Bar|Spinner|Icons')),%ProgressOption
#PROMPT('For Progress show:',OPTION),%ProgressOptionValue
#PROMPT('Percent Complete',RADIO)
#PROMPT('Records Read',RADIO)
#PROMPT('Neither',RADIO)
#PROMPT('Start Iconized', CHECK),%MDIProgWinIconize
#PROMPT('Show Progress when Iconized', CHECK),%MDIProgWinIconizedProg
One other change you can make is to improve the Progress Window. Its too small given the size of modern displays. It uses a Font that is too small and an ugly bit map FONT('MS Sans Serif',8,...).
You’ll find this current code:
ProgressWindow WINDOW('Progress...'),AT(,,162,64),FONT('MS Sans Serif',8,,FONT:regular),CENTER,TIMER(1),GRAY, |
#IF(NOT %MDIProgWin)
DOUBLE
#ELSE
#IF(NOT %MDIProgWinIcon)
DOUBLE,MDI,SYSTEM
#ELSE
DOUBLE,MDI,SYSTEM,ICON('%MDIProgWinIcon'),IMM
#ENDIF
#ENDIF
PROGRESS,USE(Progress:Thermometer),AT(25,15,111,12),RANGE(0,100),HIDE
STRING(' '),AT(71,15,21,17),FONT('Arial',18,,FONT:bold),USE(?Spinner:Ctl),CENTER,HIDE
#IF(%ProgressOption='Icons')
... Icon controls, No change, Don't use ...
#ENDIF
STRING(''),AT(0,3,161,10),USE(?Progress:UserString),CENTER
STRING(''),AT(0,30,161,10),USE(?Progress:PctText),TRN,CENTER
BUTTON('Cancel'),AT(55,42,50,15),USE(?Progress:Cancel)
END
#ENDIF
I changed to this that uses Font Segoe UI 9pt and makes the Window and controls larger:
#IF(NOT %MDIProgWin)
ProgressWindow WINDOW('Progress...'),AT(,,282,78),FONT('Segoe UI',9,,FONT:regular),CENTER,TIMER(1),GRAY
#ELSE
#IF(NOT %MDIProgWinIcon)
ProgressWindow WINDOW('Progress...'),AT(,,282,78),FONT('Segoe UI',9,,FONT:regular),CENTER,TIMER(1),GRAY,MDI,SYSTEM
#ELSE
ProgressWindow WINDOW('Progress...'),AT(,,282,78),FONT('Segoe UI',9,,FONT:regular),CENTER,TIMER(1),GRAY,MDI,SYSTEM,ICON('%MDIProgWinIcon'),IMM
#ENDIF
#ENDIF
PROGRESS,USE(Progress:Thermometer),AT(25,21,231,14),RANGE(0,100),HIDE
STRING(' '),AT(131,21,21,17),FONT('Arial',18,,FONT:bold),USE(?Spinner:Ctl),CENTER,HIDE
#IF(%ProgressOption='Icons')
... Icon controls, No change, Don't use ...
#ENDIF
STRING(''),AT(0,5,281),USE(?Progress:UserString),CENTER
STRING(''),AT(0,40,281),USE(?Progress:PctText),TRN,CENTER
BUTTON('Cancel'),AT(115,56,50,15),USE(?Progress:Cancel),SKIP
END
#ENDIF