hexagon logo

Setting the "Print Background Colors" report setting in code.

There's a weird sort of bug, at least up to version 2020R2, that propagates the setting "Print Background Colors". I know you can change this by hitting F5, but the situation is slightly more complicated. I will provide an example:

Lets say you have a program named "PROGRAM A". In this program, if you hit F5 and check the setting, it is set to OFF.
Now you need to check something from a different program, "PROGRAM B", so you open it at the same time that you have PROGRAM A open.
PROGRAM B has that setting set ON.
Now if you go back and save PROGRAM A, you will have just changed the Print Background Colors setting unwittingly.
It propagates a bit like a virus, albeit one without any real import.
But having the background colors on really annoys our operators for some reason.

So I had a thought... Is there a way to programmatically set it OFF right before you print? (Mind you, in DMIS code, not in VBA).
That way, we can put it in our template, and I don't have to remember to check it every time I save my program.

If anybody has an idea, I'd be glad to learn of it.


Thank you in advance.