none
(Sumber: mailist DOTNET) Setting Ukuran Kertas di Crystal Report

    Question

  • TO.MASTER.

     

    Mohon Bantuannya, Saya Sedang Mengalami kesulitan dalam script, Menyeting Ukuran Kertas di Crystal Report.

    Bagaimana Ya Caranya. Mohon Pencerahannya.


    Agnes Sannie [MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    Friday, December 09, 2011 9:07 AM
    Moderator

Answers

  • Mungkin bisa membantu :

     

    1. Buat dulu settingan custom ukuran kertasnya di Windows Print & Fax -> Pilih Salah Satu Printernya -> Server  Properties.

     

    2. Scriptnya : Saya pake VS2008+Crystal Report

     

         Dim PrintDoc As New System.Drawing.Printing.PrintDocument
            PrintDoc.PrinterSettings.PrinterName = "LQ2180"       'Comment : Printer Name harus ada di PC tersebut, kl mau bisa juga Printer Name di server
            Dim PkSize As New System.Drawing.Printing.PaperSize

            Dim k As Integer
            For k = 0 To PrintDoc.PrinterSettings.PaperSizes.Count - 1
                If PrintDoc.PrinterSettings.PaperSizes.Item(k).PaperName = "Slip 5.5 X 9.5" Then   'Ini ukuran kertas custom yang dibuat di Windows -> Printer & Fax -> Server Properties
                    PkSize = PrintDoc.PrinterSettings.PaperSizes.Item(k)
                End If
            Next

            Dim CRSLIPUPAHBULANAN As New RptSLIPUPAHBULANAN '(This is my Crystal Report Document that I've designed)
            CRSLIPUPAHBULANAN.PrintOptions.PrinterName = "LQ2180"
            CRSLIPUPAHBULANAN.PrintOptions.PaperSize = CType(PkSize.RawKind, CrystalDecisions.Shared.PaperSize)
            CRSLIPUPAHBULANAN.PrintOptions.PaperOrientation = CrystalDecisions.Shared.PaperOrientation.Portrait
            CRSLIPUPAHBULANAN.PrintOptions.PaperSource = PaperSource.Tractor
           
            Print.CrystalReportViewer1.ReportSource = CRSLIPUPAHBULANAN
            Print.CrystalReportViewer1.Refresh()
            Print.CrystalReportViewer1.Show()

     

    Dijawab oleh: Rahmat Seftriawan


    Agnes Sannie [MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    Friday, December 09, 2011 9:08 AM
    Moderator

All replies

  • Mungkin bisa membantu :

     

    1. Buat dulu settingan custom ukuran kertasnya di Windows Print & Fax -> Pilih Salah Satu Printernya -> Server  Properties.

     

    2. Scriptnya : Saya pake VS2008+Crystal Report

     

         Dim PrintDoc As New System.Drawing.Printing.PrintDocument
            PrintDoc.PrinterSettings.PrinterName = "LQ2180"       'Comment : Printer Name harus ada di PC tersebut, kl mau bisa juga Printer Name di server
            Dim PkSize As New System.Drawing.Printing.PaperSize

            Dim k As Integer
            For k = 0 To PrintDoc.PrinterSettings.PaperSizes.Count - 1
                If PrintDoc.PrinterSettings.PaperSizes.Item(k).PaperName = "Slip 5.5 X 9.5" Then   'Ini ukuran kertas custom yang dibuat di Windows -> Printer & Fax -> Server Properties
                    PkSize = PrintDoc.PrinterSettings.PaperSizes.Item(k)
                End If
            Next

            Dim CRSLIPUPAHBULANAN As New RptSLIPUPAHBULANAN '(This is my Crystal Report Document that I've designed)
            CRSLIPUPAHBULANAN.PrintOptions.PrinterName = "LQ2180"
            CRSLIPUPAHBULANAN.PrintOptions.PaperSize = CType(PkSize.RawKind, CrystalDecisions.Shared.PaperSize)
            CRSLIPUPAHBULANAN.PrintOptions.PaperOrientation = CrystalDecisions.Shared.PaperOrientation.Portrait
            CRSLIPUPAHBULANAN.PrintOptions.PaperSource = PaperSource.Tractor
           
            Print.CrystalReportViewer1.ReportSource = CRSLIPUPAHBULANAN
            Print.CrystalReportViewer1.Refresh()
            Print.CrystalReportViewer1.Show()

     

    Dijawab oleh: Rahmat Seftriawan


    Agnes Sannie [MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    Friday, December 09, 2011 9:08 AM
    Moderator
  • Butuhnya custom paper size atau normal paper size macam A4, Letter, dkk nya ? kalau cuman yang normal paper size sich tinggal disetting aja lewat menu Crystal Reports > Design > Printer Setup

    Dari kotak dialog Print Setup tar bisa pilih paper size yang diinginkan.

    Dijawab oleh: Adi


    Agnes Sannie [MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    Friday, December 09, 2011 9:09 AM
    Moderator