Register Register Member Login Member Login Member Login Forgot Password ??
PHP , ASP , ASP.NET, VB.NET, C#, Java , jQuery , Android , iOS , Windows Phone
 

Registered : 109,027

HOME > .NET Framework > Forum > VB.NET PrintPage สอบถามปัญหาการ Report ออกรายงานใน VB รบกวนด้วยครับ ตัวอักษร



 

VB.NET PrintPage สอบถามปัญหาการ Report ออกรายงานใน VB รบกวนด้วยครับ ตัวอักษร

 



Topic : 094266

Guest




ตัวอย่าง


อยากทราบว่า จะแก้ไขยังไงครับ เนื่องขากอยากให้ข้อความเลือนไปทางซ้ายเมือเราเพิ่มจำนวนตัวอักษรหรือตัวเลข

Code (VB.NET)
Private Sub PrintReportSell_PrintPage(ByVal sender As System.Object, ByVal e As System.Drawing.Printing.PrintPageEventArgs) Handles PrintDocument1.PrintPage
        Dim PrintFont As New Font("Arial", 10)
        Dim NameFont As New Font("Arial", 10)

        e.Graphics.DrawString(TextNO.Text, NameFont, Brushes.Black, 630, 100)   'เลขที่ใบชั่ง
        e.Graphics.DrawString(DateTime.Value, NameFont, Brushes.Black, 630, 130) 'วันที่
        e.Graphics.DrawString(TextCustomer.Text, NameFont, Brushes.Black, 160, 130) 'นามลูกค้า
        e.Graphics.DrawString(TextRegistration.Text, NameFont, Brushes.Black, 160, 160) 'ทะเบียนรถ
        e.Graphics.DrawString(TextTimeIN.Text, NameFont, Brushes.Black, 550, 160) 'เวลารถเข้า
        e.Graphics.DrawString(TextTimeOUT.Text, NameFont, Brushes.Black, 700, 160) 'เวลารถออก
        e.Graphics.DrawString("############", PrintFont, Brushes.Black, 330, 185) '###########
        e.Graphics.DrawString("จำนวนตัน", PrintFont, Brushes.Black, 320, 220) 'จำนวนตัน
        e.Graphics.DrawString(TextPrice.Text, PrintFont, Brushes.Black, 560, 220) 'ราคาต่อหน่วย
        e.Graphics.DrawString(TextMoney.Text, PrintFont, Brushes.Black, 690, 220) 'เป็นเงิน
        e.Graphics.DrawString(TextRockType.Text, NameFont, Brushes.Black, 180, 250) 'ชนิดหิน
        e.Graphics.DrawString(TextNum.Text, NameFont, Brushes.Black, 330, 250) 'จำนวนตัน
        e.Graphics.DrawString(TextSummoney.Text, NameFont, Brushes.Black, 690, 280) 'เป็นเงิน
        e.Graphics.DrawString(TextDiscount.Text, NameFont, Brushes.Black, 690, 310) 'ส่วนลด
        e.Graphics.DrawString(TextSumAllmoney.Text, NameFont, Brushes.Black, 690, 340) 'รวมเป็นเงินทั้งสิ้น
        e.Graphics.DrawString(TextPayment.Text, NameFont, Brushes.Black, 690, 370) 'ยอดชำระ
        e.Graphics.DrawString(TextCommute.Text, NameFont, Brushes.Black, 690, 400) 'ยอดทอน

        '==============================================================================================
        e.Graphics.DrawString("น้ำหนักเข้า", PrintFont, Brushes.Black, 290, 295) 'น้ำหนักเข้า
        e.Graphics.DrawString("น้ำหนักออก", PrintFont, Brushes.Black, 290, 325) 'น้ำหนักออก
        e.Graphics.DrawString("น้ำหนักสุทธิ", PrintFont, Brushes.Black, 290, 355) 'น้ำหนักสุทธิ
        e.Graphics.DrawString("ประเภทรถ", PrintFont, Brushes.Black, 290, 415) 'ยอดทอน
        '==============================================================================================
        e.Graphics.DrawString(TextWeightIN.Text, NameFont, Brushes.Black, 400, 295) 'น้ำหนักเข้า
        e.Graphics.DrawString(TextWeightOUT.Text, NameFont, Brushes.Black, 400, 325) 'น้ำหนักออก
        e.Graphics.DrawString(TextSumWeight.Text, NameFont, Brushes.Black, 400, 355) 'น้ำหนักสุทธิ
        e.Graphics.DrawString(TextCarType.Text, NameFont, Brushes.Black, 400, 415) 'ยอดทอน
        '=============================================================================================
        e.Graphics.DrawString(TextCusSell.Text, NameFont, Brushes.Black, 180, 360) 'ผู้รับเงิน

        e.Graphics.PageUnit = GraphicsUnit.Inch
    End Sub




Tag : VB.NET







Move To Hilight (Stock) 
Send To Friend.Bookmark.
Date : 2013-04-25 19:33:45 By : nuttawut View : 1901 Reply : 3
 

 

No. 1



โพสกระทู้ ( 74,058 )
บทความ ( 838 )

สมาชิกที่ใส่เสื้อไทยครีเอท

สถานะออฟไลน์
Twitter Facebook

ลองดูพวก Alignment ครับ

Code (VB.NET)
    ' Construct a new Rectangle. 
    Dim displayRectangle _
        As New Rectangle(New Point(40, 40), New Size(80, 80))

    ' Construct two new StringFormat objects 
    Dim format1 As New StringFormat(StringFormatFlags.NoClip)
    Dim format2 As New StringFormat(format1)

    ' Set the LineAlignment and Alignment properties for 
    ' both StringFormat objects to different values.
    format1.LineAlignment = StringAlignment.Near
    format1.Alignment = StringAlignment.Center
    format2.LineAlignment = StringAlignment.Center
    format2.Alignment = StringAlignment.Far

    ' Draw the bounding rectangle and a string for each 
    ' StringFormat object.
    e.Graphics.DrawRectangle(Pens.Black, displayRectangle)
    e.Graphics.DrawString("Showing Format1", Me.Font, Brushes.Red, _
        RectangleF.op_Implicit(displayRectangle), format1)
    e.Graphics.DrawString("Showing Format2", Me.Font, Brushes.Red, _
        RectangleF.op_Implicit(displayRectangle), format2)







แสดงความคิดเห็นโดยอ้างถึง ความคิดเห็นนี้
Date : 2013-04-26 13:59:48 By : mr.win
 


 

No. 2

Guest


ขอบคุณครับ คุณ TC Admin ได้แล้ว
แสดงความคิดเห็นโดยอ้างถึง ความคิดเห็นนี้
Date : 2013-04-27 01:49:44 By : nuttwut
 

 

No. 3



โพสกระทู้ ( 74,058 )
บทความ ( 838 )

สมาชิกที่ใส่เสื้อไทยครีเอท

สถานะออฟไลน์
Twitter Facebook

จัดไปครับ
แสดงความคิดเห็นโดยอ้างถึง ความคิดเห็นนี้
Date : 2013-04-27 11:03:23 By : mr.win
 

   

ค้นหาข้อมูล


   
 

แสดงความคิดเห็น
Re : VB.NET PrintPage สอบถามปัญหาการ Report ออกรายงานใน VB รบกวนด้วยครับ ตัวอักษร
 
 
รายละเอียด
 
ตัวหนา ตัวเอียง ตัวขีดเส้นใต้ ตัวมีขีดกลาง| ตัวเรืองแสง ตัวมีเงา ตัวอักษรวิ่ง| จัดย่อหน้าอิสระ จัดย่อหน้าชิดซ้าย จัดย่อหน้ากึ่งกลาง จัดย่อหน้าชิดขวา| เส้นขวาง| ขนาดตัวอักษร แบบตัวอักษร
ใส่แฟลช ใส่รูป ใส่ไฮเปอร์ลิ้งค์ ใส่อีเมล์ ใส่ลิ้งค์ FTP| ใส่แถวของตาราง ใส่คอลัมน์ตาราง| ตัวยก ตัวห้อย ตัวพิมพ์ดีด| ใส่โค้ด ใส่การอ้างถึงคำพูด| ใส่ลีสต์
smiley for :lol: smiley for :ken: smiley for :D smiley for :) smiley for ;) smiley for :eek: smiley for :geek: smiley for :roll: smiley for :erm: smiley for :cool: smiley for :blank: smiley for :idea: smiley for :ehh: smiley for :aargh: smiley for :evil:
Insert PHP Code
Insert ASP Code
Insert VB.NET Code Insert C#.NET Code Insert JavaScript Code Insert C#.NET Code
Insert Java Code
Insert Android Code
Insert Objective-C Code
Insert XML Code
Insert SQL Code
Insert Code
เพื่อความเรียบร้อยของข้อความ ควรจัดรูปแบบให้พอดีกับขนาดของหน้าจอ เพื่อง่ายต่อการอ่านและสบายตา และตรวจสอบภาษาไทยให้ถูกต้อง

อัพโหลดแทรกรูปภาพ

Notice

เพื่อความปลอดภัยของเว็บบอร์ด ไม่อนุญาติให้แทรก แท็ก [img]....[/img] โดยการอัพโหลดไฟล์รูปจากที่อื่น เช่นเว็บไซต์ ฟรีอัพโหลดต่าง ๆ
อัพโหลดแทรกรูปภาพ ให้ใช้บริการอัพโหลดไฟล์ของไทยครีเอท และตัดรูปภาพให้พอดีกับสกรีน เพื่อความโหลดเร็วและไฟล์ไม่ถูกลบทิ้ง

   
  เพื่อความปลอดภัยและการตรวจสอบ กระทู้ที่แทรกไฟล์อัพโหลดไฟล์จากที่อื่น อาจจะถูกลบทิ้ง
 
โดย
อีเมล์
บวกค่าให้ถูก
<= ตัวเลขฮินดูอารบิก เช่น 123 (หรือล็อกอินเข้าระบบสมาชิกเพื่อไม่ต้องกรอก)







Exchange: นำเข้าสินค้าจากจีน, Taobao, เฟอร์นิเจอร์, ของพรีเมี่ยม, ร่ม, ปากกา, power bank, แฟลชไดร์ฟ, กระบอกน้ำ

Load balance : Server 04
ThaiCreate.Com Logo
© www.ThaiCreate.Com. 2003-2024 All Rights Reserved.
ไทยครีเอทบริการ จัดทำดูแลแก้ไข Web Application ทุกรูปแบบ (PHP, .Net Application, VB.Net, C#)
[Conditions Privacy Statement] ติดต่อโฆษณา 081-987-6107 อัตราราคา คลิกที่นี่