FAQ Answer Window
Back to Technical FAQs
Print this window by pressing 'CTRL' and 'P'

Q: I have taken a standard bar chart report template and modified the report instructions to skip certain tasks and exclude them from the report. This works fine until I include Headings in the report - the report now occasionally misses out a heading change. What is wrong?

A: Hornet Windmill uses the task sequence given by the current Select and Sort file in controlling the display of headings. A heading change is marked on the first task within each section and if you include a jump to exclude certain tasks then the report will miss out the control that prints the heading on the page. You will notice the effect when your exclusion criteria happen to reject the first task in any section.

The easiest approach is to use a Select and Sort file that excludes the tasks you do not need - this will ensure that the headings in the report will print correctly. If you cannot do this and you wish to solve the issue within the report instructions then you will need to make some further changes. The main headings are controlled by the parameter Mhead, you will need to make a copy of this value within the instruction file, for example dMhead and use this to control printing of headings. Add the instructions as follows:

;ev dMhead=0
Add this at the top of the file, before the NACTIVITY command is encountered.
;if Mhead=1
;ev dMhead=1
;endif
Set the value dMhead after the NACTIVITY command and before your new section that rejects the task for inclusion.
;if dMhead=1
;do headingM
;endif
Change the section that calls the heading section to use dMhead in place of Mhead.
;ev dMhead=0
Within the main heading section (starts with the label headingM) add a line to set the value of dMhead back to zero.

If you are also using subheadings then you will need to repeat the above changes for this section using the parameters dShead and Shead.

Ref: 18030