Quantcast
Viewing all articles
Browse latest Browse all 21127

DataReport Issue

1. I've installed VB6 Service Pack. Orientation is well taken care with this.
2. I've set default paper size as A4 in Settings..>. ControlPanel..>. Printers...>..Printing Preference.
3. One of my Report should be half of A4 size in Portrait.
4. This is how I've coded..

Code:

If RptSize = "Small" Then
    Printer.PaperSize = vbPRPSA4
    Printer.Width = 16833
    Printer.Height = 11908
    DR.Orientation = rptOrientLandscape
   
ElseIf RptSize = "Big" Then
    Printer.PaperSize = vbPRPSA4
    Printer.Width = 11908
    Printer.Height = 16833
    DR.Orientation = rptOrientPortrait
   
ElseIf RptSize = "VerySmall" Then
   
    Printer.PaperSize = vbPRPSUser
    Printer.Width = 11908
    Printer.Height = 8415      ' half of A4
    DR.Orientation = rptOrientPortrait

   
End If

The colored portion of the code does't work. I need the report to stop in the midway itself. But it goes for entire A4 (as default is set like that).
Is there a way to change the default paper size in PRINTING PREFERENCE programatically ?

Viewing all articles
Browse latest Browse all 21127

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>