Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

report print settings

Status
Not open for further replies.

dm1

IS-IT--Management
May 6, 2000
22
US
Hi,

Has anyone found a way of having a report adjust to a paper and margin size automatically? I'm trying to find a way to have the paper size (a4 or letter) detected from the default printer setup, and then apply that setting to the report, along with an small increase in the left margin size if the paper size is letter.

Any thoughts? or am i resigned to having a UK and USA report, picking up on the relevant one from a user defined field in the db?

any other print info would be most welcome...

Cheers, Jon. [sig][/sig]
 
Jon

This requires some pretty intricate coding. I haven't done this myself, but you can find a MS KB article on the relevant property 'PrtDevMode' at
The Papersize property of this lets you look at properties like length, width, etc for a report. I assume that if the report is set to print to the default printer, this will tell you what the default paper size is.

HOWEVER, have you considered that dynamically redesigning your report to put everything in the right place could get you into some nightmarish admin situation? I don't know how complex your report is, but I wouldn't relish recoding the position of every new element according to the size of paper. Better to do the two reports (A4 and letter sizes), then use the above information to determine automatically which one you should open.

Hope that helps

Nick [sig][/sig]
 
Nick,

Thanks very much for your reply. I've now settled on a method of a default paper size setting, chosen by the db admin, with an option to override that on the reports selection menu, on a temporary basis. that, coupled with 2 report versions using same width settings but different margins and page size, seems to work quite well.

Thanks, Jon. [sig][/sig]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top