Printing Reports
This presentation is the property of its rightful owner.
Sponsored Links
1 / 78

Printing Reports การออกรายงาน PowerPoint PPT Presentation


  • 63 Views
  • Uploaded on
  • Presentation posted in: General

Printing Reports การออกรายงาน. วัตถุที่ยอมให้พิมพ์ข้อมูลลงได้ ( Printable Objects ). แบบฟอร์ม ( Forms ). เครื่องพิมพ์ (Printer). กล่องรูปภาพ ((Picture Box). หน้าต่างอิมมิเดียด ((Immediate Window). คำสั่งพิมพ์. Form1.Print พิมพ์ลง Form1. Printer.Print พิมพ์ลง เครื่องพิมพ์.

Download Presentation

Printing Reports การออกรายงาน

An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -

Presentation Transcript


Printing reports

Printing Reports


Printing reports

(Printable Objects)

  • (Forms)

  • (Printer)

  • ((Picture Box)

  • ((Immediate Window)


Printing reports

Form1.Print Form1

Printer.Print

Picture1.Print Picture1

Debug.Print Immediate Window


Printing reports

Object.Print varList or contList

Object Form, PictuerBox, Printer, Debug ( Immediate Window)

varList 1 ( , ) ( ; )


Printing reports

contList 1 ( , ) ( ; )


Printing reports

(Print Zone) 1 = 14


Printing reports

Private Sub Form_Click()

Form1.Print I am studying VB

End Sub

Form1 Run I am studying VB


Printing reports

Private Sub Form_Click()

Dim j as Integer

Dim x as Single

Dim t as String

j = 1500

x = 12.25

t = Thai

Form1.Print j;x;t

End Sub


Printing reports

Private Sub Form_Click()

Dim j as Integer

Dim x as Single

Dim t as String

j = 1500

x = 12.25

t = Thai

Form1.Print j,x,t

End Sub


Printing reports

Spc(n) n

Tab(n) n

String(n,c) c n


Printing reports

Spc Tab

Private Sub Form_Click()

Dim j as Integer

Dim x as Single

Dim t as String

j = 1500 : x = 12.25 : t = Thai

Form1.Print "Space using Spc

Form1.Print Spc(10); j ; Spc(10) ; x

Form1.Print "Space using Tab"

Form1.Print Tab(10) ; j ; Tab(20) ; x

End Sub


Printing reports

String 10 80

Private Sub Form_Click()

Dim I as Integer

for I = 1 to 10

Form1.Print String(80,.)

Next

End Sub


Printing reports

Currency

Fixed 1 2


Printing reports

Standard 1 2

Percent (%)

Scientific E E


Printing reports

Yes/No Yes 0 No 0

True/False True 0 False 0

On/Off On 0 Off 0


Printing reports

Private Sub Form_Click()

Dim j as Long

Dim x,y as Double

j = 1285547204

x = 0.000000456

y = 7562.2147

Form1.Print j

Form1.Print x

Form1.Print y

End Sub


Printing reports

Currency

Private Sub Form_Click()

Dim j as Long

Dim x,y as Double

j = 1285547204

x = 0.000000456

y = 7562.2157

Form1.Print Format(j, "Currency")

Form1.Print Format(x, "Currency")

Form1.Print Format(y, "Currency")

End Sub


Printing reports

Fixed

Private Sub Form_Click()

Dim j as Long

Dim x,y as Double

j = 1285547204

x = 0.000000456

y = 7562.2157

Form1.Print Format(j, "Fixed")

Form1.Print Format(x, "Fixed")

Form1.Print Format(y, "Fixed")

End Sub


Printing reports

Standard

Private Sub Form_Click()

Dim j as Long

Dim x,y as Double

j = 1285547204

x = 0.000000456

y = 7562.2157

Form1.Print Format(j, "Standard")

Form1.Print Format(x, "Standard")

Form1.Print Format(y, "Standard")

End Sub


Printing reports

Percent

Private Sub Form_Click()

Dim j as Long

Dim x,y as Double

x = 0.0245759

Form1.Print Format(x, Percent")

End Sub


Printing reports

Scientific

Private Sub Form_Click()

Dim j as Long

Dim x,y as Double

j = 1285547204

x = 0.000000456

y = 7562.2157

Form1.Print Format(j, "Scientific")

Form1.Print Format(x, " Scientific ")

Form1.Print Format(y, " Scientific ")

End Sub


Printing reports

Yes/No, True/False On/Off

Private Sub Form_Click()

Dim j,k,i as Integer

j = 0

k = 2

l = 1

Form1.Print Format(j, Yes/No")

Form1.Print Format(k, " True/False ")

Form1.Print Format(l, " On/Off ")

End Sub


Printing reports

0 0

#

.

,

%


Printing reports

E-,E+,e-,e+ E-, e- E+, e+


Printing reports

Long Date

Medium Date

Short Date


Printing reports

Long Time::

Medium Time ::AM PM

Short Time :


Printing reports

Private Sub Form_Click()

Dim dateX As Date

dateX = Now

Form1.Print " General date ", dateX

Form1.Print "Long Date ", Format(dateX, "Long Date")

Form1.Print "Medium Date ", Format(dateX, & _"Medium Date")

Form1.Print "Short Date ", Format(dateX, "Short Date")

Form1.Print " Long Time ", Format(dateX, "Long Time")

Form1.Print " Medium Time ", Format(dateX, "Medium Time")

Form1.Print " Short Time", Format(dateX, "Short Time")

End Sub


Printing reports

Working with Fonts


Printing reports

Name Form1

Form1.Font.Name = AngsanaUPC


Printing reports

Size

Form1.Font.Size = 14

Picture1.Font.Size = 72

Bold

Form1.Font.Bold = True


Printing reports

Form1.Font.Bold = False

Italic

Form1.Font.Italice = True


Printing reports

Underline 1

Picture1.Font.Underline = True

Picture1.Font.Underline = False


Printing reports

StrikeThrough 1

Picture.Font.StrikeThrough = True

Picure1.Font.StrikeThrough = False


Printing reports

Weight

Form1.Font.Weight = 400

Form1.Font.Weight = 700


Printing reports

vbBlack (Black)

vbRed (Red)

vbGreen (Green)

vbYellow(Yellow)

vbBlue (Blue)

vbMagenta (Magenta)

vbCyan (Cyan)

vbWhite ( White )

White


Printing reports

(RGB)

RGB(red, green, blue)

red 0 - 255

green 0 - 255

blue 0 - 255


Printing reports

Black000

Blue00255

Green02550

Cyan0255255

Red25500

Magenta2550255

Yellow2552550

White255255255

White

RGB


Printing reports

(QBColor)

QBColor(color)

color 0 - 15


Printing reports

0Black8Gray

1Blue9Light Blue

2Green10Light Green

3Cyan11Light Cyan

4Red12Light Red

5Magenta13Light Magenta

6Yellow14Light Yellow

7White15Bright White


Printing reports

ForeColor

Form1.ForeColor = vbRed

Form1.ForColor = RGB(255,0,0)

Form1.ForColor = QBColor(4)

Form1.Print

Form1


Printing reports

Form1

Picture1 Picture1

Command1 cmdPrintForm

Command3 cmdPrintPicture

Command3 cmdExit


Printing reports


Printing reports

Run


Printing reports

Displaying Graphic


Printing reports

X Y


Printing reports

X Y

X

Y


Printing reports

(ScaleMode)

(Twip) 1 = 1440 567

(Point) 1 = 72

(Picxel)

(Character) 1 120 240 ).


Printing reports

object.ScaleMode = value

1VbTwips ()

2 VbPoints

3 VbPixels

4 vbCharacters

5 VbInches

6 VbMillimeters

7 VbCentimeters


Printing reports

Drawing Methods


Printing reports

Bitmap, JPEG GIF


Printing reports

Height ScaleHeight

Width ScaleWidth

TopScaleTop

LeftScaleLeft


Printing reports

Height, Width . Height Width

ScaleHeight,ScaleWidth ScaleHeight ScaleWidth


Printing reports

Top

Left

ScaleTop 0

ScaleLeft 0


Printing reports

Top, Left

ScaleTop,ScaleLeft

FORM

Height

ScaleHeight

ScaleWidth

Width


Printing reports

ScaleHeight ScaleWidth

ScaleHeight ScaleWidth (ScaleMode) X Y


Printing reports

ScaleHeight = 100

ScaleWidth = 100

100 100


Printing reports

1

2

3 100

4


Printing reports

0.9

14 (.)


Printing reports

X = 20, Y = 50


Printing reports


Printing reports


Printing reports


Printing reports

  • Cls

  • Line

  • Circle

  • Point

  • Pset

  • Print


Printing reports

object.Line (x1, y1) - Step (x2, y2), [color], [B][F]

object

Line

(x1, y1)

-

Step x,y

Step x,y


Printing reports

(x2, y2) Step Step

color RGB QBColor

B

F FillColor FillStyle


Printing reports

Command1 cmdLine

Command2 cmdExit


Printing reports

Run


Printing reports

Command1 cmdLine

Command2 cmdExit


Printing reports


Printing reports


Printing reports


Printing reports

Command1 cmdLine

Command2 cmdExit


Printing reports


Printing reports


Printing reports

Run


  • Login