Skip to main content
Announcements
Qlik Connect 2025: 3 days of full immersion in data, analytics, and AI. May 13-15 | Orlando, FL: Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Sheet printing

I want to print the sheet using macro but I dont get the backgroud printed in the output.

Anyone who knows the command for enabling background printing.

Also let me know if there is any command for page size in print options.

4 Replies
Anonymous
Not applicable
Author

See SheetPrintDrawBackground in API Guide:

set docprop = ActiveDocument.GetProperties

set ps = docprop.PrintSheetSettings

ps.SheetPrintDrawBackGround = true

ActiveDocument.SetProperties docprop

Anonymous
Not applicable
Author

Not quite working

Below is what my report looks like:-

This is what i get by printing using macro:-

sub export

set docprop = ActiveDocument.GetProperties

set ps = docprop.PrintSheetSettings

ps.SheetPrintDrawBackGround = true

ActiveDocument.SetProperties docprop

ActiveDocument.sheets("Main").print

end sub

Anonymous
Not applicable
Author

The report in viewer

report.png

the print document

print.png

Anonymous
Not applicable
Author

How it works if you print sheet manually, without macro, and check "draw background"?

If they work differently, it is a bug in API.  If they work the same way, you probably miss something.

Regards,

Michael.