Update: here is an example but it is in VB:
http://msdn.microsoft.com/archive/default.asp?url=/archive/en-us/dnarvbtips/html/msdn_msdn116.aspIf it is a report, you could edit the frx programmatically. We do this in our programs for different reasons. We copy the frx to a temporary file and change the settings we need to and run the temp file frx instead of the original in code. Other than that, the only way I know of is to send the printer control codes to the printer using ??? in code which is dependent on your printer, although many printers accept standard hp LJII, IBM, or Epson codes. All of our laserjets and ink jet printers accept LJII codes and all of our dot matrix printers accept Epson or IBM codes. For sending printer control codes, I did cheat and pull most of them from the prntcode.dbf that came with FPD26.
As I think about this a bit more, it seems there should be an API that you could call to do this...
>Hi everybody,
>
>Do you know, how can I set printer mode programmatically either Landscape or Normal? I would prefer to have a general approach and not printer specific codes...
>
>Thanks in advance.
.·*´¨)
.·`TCH
(..·*
010000110101001101101000011000010111001001110000010011110111001001000010011101010111001101110100
"When the debate is lost, slander becomes the tool of the loser." - Socrates
Vita contingit, Vive cum eo. (Life Happens, Live With it.)
"Life is not measured by the number of breaths we take, but by the moments that take our breath away." -- author unknown
"De omnibus dubitandum"