ObjectPal Printer options 
Author Message
 ObjectPal Printer options

I'm trying to set the papersize option in one of my reports and cant figure out
how to do it. I have looked thru all of what I think would be opbject code
commands but cant figure it out.

This is what I have and it works (less the -----  ;
rptinfo.Printersize=PRNEnv10-----
portion evidently is not right.  Any help?

method pushButton(var eventInfo Event)

var

        rpt Report
   recuserOptions, Rptinfo PrinterOptionInfo

endvar

        UserInput = " Send To Screen or Printer?"
        UserInput.view ("Enter S or P")

  if UserInput = "P" or userinput = "p" then
        rptinfo.Copies=1
  ; rptinfo.Printersize=PRNEnv10
   rptinfo.Orientation=prnlandscape
   if printerSetOptions(rptinfo) then
                rpt.print ("Envelope for first mailing")
   else
           errorShow("Could not set printer options.")
   endif

        Else
     printerGetOptions(recUserOptions)
         rpt.open("Envelope for first mailing")
        endif

endmethod
--

      \\\|///
     \\ ~ ~ //        Brad Morris
     (/ o o /)        
---oOOo-(_)-oOOo---------------------------------------------
                    1616 Williston Ave
                    Waterloo, Iowa 50702
       oooO              
      (   )    Oooo      
-------\ (-----(   )--------------------------------------------

               (_/



Fri, 20 Jul 2001 03:00:00 GMT
 ObjectPal Printer options

Can you set the paper size manually? If so then you can read the returned paper
size (numerical value) with printerGetOptions. After reading the PaperSize value
you can change if with ObjectPAL using PrinterSetOptions. HTH

  var
      printerAr   DynArray[] AnyType
  endVar

   ; Get the current printer settings.
   printerGetOptions(printerAr)

   printerAr.view("Current printer-settings")

   var
      siNCopies   SmallInt
      stPrompt    String
      prnOptions  PrinterOptionInfo
      reOrders    Report
   endVar

   siNCopies = 0
   stPrompt  = "Print how many copies?"

   siNCopies.view(stPrompt)
   if siNCopies > 0 then
      prnOptions.Copies = siNCopies
   else
      return
   endIf

; Use constant to specify lower paper tray.
   prnOptions.DefaultSource = prnLower

; Use constant (OR Numerial Value ) to specify papersize
  prnOptions.PaperSize = prnEnv10  ;// or a numerical value

; Use constant to specify landscape (long) orientation.
   prnOptions.Orientation = prnLandscape

; Use constant to specify high quality print.
   prnOptions.PrintQuality = prnHigh

   if printerSetOptions(prnOptions) then
      reOrders.print("orders")
   else
      errorShow("Could not set printer options.")
   endIf

Quote:

> I'm trying to set the papersize option in one of my reports and cant figure out
> how to do it. I have looked thru all of what I think would be opbject code
> commands but cant figure it out.

> This is what I have and it works (less the -----  ;
> rptinfo.Printersize=PRNEnv10-----
> portion evidently is not right.  Any help?

> method pushButton(var eventInfo Event)

> var

>         rpt Report
>    recuserOptions, Rptinfo PrinterOptionInfo

> endvar

>         UserInput = " Send To Screen or Printer?"
>         UserInput.view ("Enter S or P")

>   if UserInput = "P" or userinput = "p" then
>         rptinfo.Copies=1
>   ; rptinfo.Printersize=PRNEnv10
>    rptinfo.Orientation=prnlandscape
>    if printerSetOptions(rptinfo) then
>                 rpt.print ("Envelope for first mailing")
>    else
>            errorShow("Could not set printer options.")
>    endif

>         Else
>      printerGetOptions(recUserOptions)
>          rpt.open("Envelope for first mailing")
>         endif

> endmethod
> --

>       \\\|///
>      \\ ~ ~ //        Brad Morris
>      (/ o o /)
> ---oOOo-(_)-oOOo---------------------------------------------
>                     1616 Williston Ave
>                     Waterloo, Iowa 50702
>        oooO
>       (   )    Oooo
> -------\ (-----(   )--------------------------------------------

>                (_/

--
Michael


Fri, 20 Jul 2001 03:00:00 GMT
 
 [ 2 post ] 

 Relevant Pages 

1. ObjectPAL printer options?

2. Setting Printer Options Through ObjectPal

3. ObjectPal printer control

4. How to select printer in Objectpal

5. Selecting Printer and Tray in ObjectPAL

6. ObjectPAL for "Using With" option

7. Revisiting: Printer Setup via ObjectPal

8. Printer control with ObjectPal

9. Checking printer setup through ObjectPAL

10. Changing Printers using ObjectPal

11. Printer switching in ObjectPal

12. PDOXWIN 5.0 : Changing Printers in ObjectPAL


 
Powered by phpBB® Forum Software