Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Visual Basic
  4. HOW TO SET Crystal Sub report Paper source

HOW TO SET Crystal Sub report Paper source

Scheduled Pinned Locked Moved Visual Basic
graphicstutorialquestion
1 Posts 1 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    Anoop Brijmohun
    wrote on last edited by
    #1

    Hi Guys, I have a Crystal report with a sub report. i need to set the subreport to use paper from an alt. tray from the printer. any ideas?

    rptMain.Subreports(0).PrintOptions.CustomPaperSource = GetSelectedPaperSource(Me.cbDft.Text.Trim)

    Private Function GetSelectedPaperSource(ByVal paper As String) As System.Drawing.Printing.PaperSource
    Try
    Dim selectedPaperSource As System.Drawing.Printing.PaperSource = New System.Drawing.Printing.PaperSource
    Dim myPrinterSettings As System.Drawing.Printing.PrinterSettings = New System.Drawing.Printing.PrinterSettings()
    myPrinterSettings.PrinterName = Me.lblPrinter.Text.Trim
    For Each myPaperSource As System.Drawing.Printing.PaperSource In myPrinterSettings.PaperSources
    If myPaperSource.SourceName = paper Then
    Return myPaperSource
    End If
    Next

        Catch ex As Exception
            Throw New Exception(ex.Message & vbCrLf)
        End Try
    End Function
    

    thanks

    1 Reply Last reply
    0
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    • Login

    • Don't have an account? Register

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • World
    • Users
    • Groups