[GB.REPORT2]

* BUG: Now the printer resolution is always 1200 dpi.
* NEW: The report preview dialog layout is changed to be more readable
  with less info. Feel free to tell me your opinions.
  


git-svn-id: svn://localhost/gambas/trunk@7254 867c0c6c-44f3-4631-809d-bfa615b0a4ec
This commit is contained in:
Fabien Bodard 2015-08-30 12:10:41 +00:00
parent e909d1ea5a
commit e845dc1e3b
7 changed files with 84 additions and 82 deletions

View file

@ -1,5 +1,5 @@
[Component]
Key=gb.report2
Version=3.8.0
Version=3.8.90
Needs=Form
Requires=gb.form

View file

@ -1,9 +1,9 @@
# Gambas Project File 3.0
# Compiled with Gambas 3.7.90
# Compiled with Gambas 3.8.0
Title=ReportsEvolution
Startup=Report8
Startup=Report11
Icon=icon.png
Version=3.8.0
Version=3.8.90
VersionFile=1
Component=gb.image
Component=gb.gui

View file

@ -13,7 +13,9 @@
Top = "16mm"
Width = "55mm"
Height = "38mm"
Border = ReportBorder["Top:1px #000000;Bottom:1px #000000;Left:1px #000000;Right:1px #000000;TopLeftCorner:5mm 4mm;TopRightCorner:7mm 15mm;BottomRightCorner:5mm;BottomLeftCorner:5mm 2mm"]
Background = ReportBrush["#00FF00"]
BoxShadow = ReportBoxShadow["1mm 1mm 6px -1px #000000"]
}
}
Index = 0

View file

@ -6,7 +6,6 @@ Private $hPrinter As New Printer As "Printer"
Private $iCurPrinterResolution As Integer
Private $bVerif As Boolean
Private $bPrinting As Boolean
Private $iPrinterRes As Integer = 1200
Private $iFileRes As Integer = 150
Static Public Function Run(hReport As Report)
@ -191,9 +190,9 @@ Public Sub cmbPaper_Click()
If View.Report.Paper = i Then Return
View.Report.Paper = i
If i = 0 Then
pnlCustom.Enabled = True
pnlCustom.Visible = True
Else
pnlCustom.Enabled = False
pnlCustom.Visible = False
View.Refresh
GetValuesFromReport
Endif
@ -243,14 +242,12 @@ Public Sub tabPrint_Click()
If tabPrint.Index = 0 Then
$hPrinter.OutputFile = ""
$hPrinter.Name = cmbPrinter.Text
$hPrinter.Resolution = $iPrinterRes
Object.Lock(cmbResolution)
Try cmbResolution.Index = Max(cmbResolution.Find(Str($iPrinterRes)), 0)
Object.Unlock(cmbResolution)
$hPrinter.Resolution = 1200
Else
$hPrinter.OutputFile = txtFile.Text
$hPrinter.Resolution = $iFileRes
Object.Lock(cmbResolution)
pnlResolution.Enabled = True
Try cmbResolution.Index = Max(cmbResolution.Find(Str($iFileRes)), 0)
Object.Unlock(cmbResolution)
Endif
@ -401,7 +398,6 @@ Public Sub Form_Close()
Settings["FPreview/ReverseOrder"] = tgbReverseCopies.Value
Settings["FPreview/CollateCopies"] = tgbCollateCopies.Value
Settings["FPreview/FileResolution"] = $iFileRes
Settings["FPreview/PrinterResolution"] = $iPrinterRes
Settings.Save()
Endif
@ -439,7 +435,6 @@ Public Sub Form_Open()
Try $hPrinter.ReverseOrder = Settings["FPreview/ReverseOrder"]
Try $hPrinter.CollateCopies = Settings["FPreview/CollateCopies"]
Try $iFileRes = Settings["FPreview/FileResolution", 150]
Try $iPrinterRes = Settings["FPreview/PrinterResolution", 1200]
Try $hPrinter.Duplex = Settings["FPreview/Duplex", Printer.Simplex] = cmbDuplex.Index
Endif
@ -530,8 +525,7 @@ End
Public Sub cmbResolution_Click()
If tabPrint.Index = 0 Then
$iPrinterRes = cmbResolution.Text
$hPrinter.Resolution = $iPrinterRes
$hPrinter.Resolution = 1200
Else
$iFileRes = cmbResolution.Text
$hPrinter.Resolution = $iFileRes

View file

@ -129,10 +129,10 @@
MoveScaled(1,22,0,15)
}
{ Panel4 VBox
MoveScaled(1,2,39,73)
MoveScaled(1,1,39,73)
Expand = True
{ tabPrint TabPanel
MoveScaled(0,0,37,10)
MoveScaled(0,0,37,15)
Arrangement = Arrange.Vertical
Spacing = True
Margin = True
@ -140,7 +140,7 @@
Count = 2
Index = 0
Text = ("Printer")
{ Panel13 HBox
{ pnlResolution HBox
MoveScaled(1,1,37,4)
Spacing = True
{ PictureBox1 PictureBox
@ -154,6 +154,20 @@
ReadOnly = True
}
}
{ Panel7 HBox
MoveScaled(1,6,35,4)
Spacing = True
{ Label2 Label
MoveScaled(0,0,12,4)
Text = ("Recto Verso")
}
{ cmbDuplex ComboBox
MoveScaled(15,0,21,4)
Expand = True
ReadOnly = True
List = [("None"), ("Short side"), ("Long side")]
}
}
Index = 1
Text = ("File")
{ Panel12 HBox
@ -171,18 +185,8 @@
ReadOnly = True
}
}
Index = 0
}
{ Separator2 Separator
MoveScaled(2,11,32,0)
}
{ VBox1 VBox
MoveScaled(1,14,38,59)
Expand = True
Spacing = True
Margin = True
{ HBox3 HBox
MoveScaled(1,0,34,4)
MoveScaled(1,6,35,4)
Spacing = True
{ TextLabel1 TextLabel
MoveScaled(1,1,12,3)
@ -199,8 +203,47 @@
Text = ("dpi")
}
}
Index = 0
}
{ Separator2 Separator
MoveScaled(3,15,32,1)
}
{ VBox1 VBox
MoveScaled(3,16,38,59)
Expand = True
Spacing = True
Margin = True
{ Panel6 HBox
MoveScaled(2,0,34,4)
Spacing = True
{ Label1 Label
MoveScaled(0,0,12,4)
Text = ("Range")
}
{ TextBox1 ButtonBox
MoveScaled(15,0,18,4)
Expand = True
Picture = Picture["icon:/16/clear"]
}
}
{ HBox1 HBox
MoveScaled(2,5,34,4)
Spacing = True
{ Label4 Label
MoveScaled(0,0,12,4)
Text = ("Copies")
}
{ TextBox2 SpinBox
MoveScaled(15,0,12,4)
Expand = True
MinValue = 1
}
}
{ Panel5 Panel
MoveScaled(2,10,33,5)
}
{ Panel14 HBox
MoveScaled(1,6,36,4)
MoveScaled(1,17,36,4)
Spacing = True
{ Label10 Label
MoveScaled(0,0,12,4)
@ -214,7 +257,7 @@
}
}
{ Panel8 HBox
MoveScaled(1,10,36,4)
MoveScaled(1,21,36,4)
Spacing = True
{ Label3 Label
MoveScaled(0,0,12,4)
@ -228,8 +271,8 @@
}
}
{ pnlCustom VBox
MoveScaled(0,14,36,9)
Enabled = False
MoveScaled(0,25,36,9)
Visible = False
Spacing = True
{ Panel3 HBox
MoveScaled(1,0,32,4)
@ -266,66 +309,29 @@
}
}
}
{ Panel7 HBox
MoveScaled(1,24,36,4)
Spacing = True
{ Label2 Label
MoveScaled(0,0,12,4)
Text = ("Recto Verso")
}
{ cmbDuplex ComboBox
MoveScaled(15,0,21,4)
Expand = True
ReadOnly = True
List = [("None"), ("Short side"), ("Long side")]
}
{ Panel13 Panel
MoveScaled(2,34,33,4)
Expand = True
}
{ tgbGrayScale CheckBox
MoveScaled(1,29,34,4)
MoveScaled(1,36,34,4)
Text = ("Grayscale")
}
{ tgbFullPage CheckBox
MoveScaled(1,33,24,4)
MoveScaled(1,40,24,4)
Visible = False
Text = ("Full page")
}
{ Panel6 HBox
MoveScaled(2,37,34,4)
Spacing = True
{ Label1 Label
MoveScaled(0,0,12,4)
Text = ("Range")
}
{ TextBox1 ButtonBox
MoveScaled(15,0,18,4)
Expand = True
Picture = Picture["icon:/16/clear"]
}
}
{ HBox1 HBox
MoveScaled(2,42,34,4)
Spacing = True
{ Label4 Label
MoveScaled(0,0,12,4)
Text = ("Copies")
}
{ TextBox2 SpinBox
MoveScaled(15,0,12,4)
Expand = True
MinValue = 1
}
}
{ tgbCollateCopies CheckBox
MoveScaled(1,47,35,3)
MoveScaled(1,45,35,3)
Text = ("Collate copies")
}
{ tgbReverseCopies CheckBox
MoveScaled(1,50,36,4)
MoveScaled(1,48,36,4)
Text = ("Reverse order")
}
{ Panel5 Panel
MoveScaled(2,53,33,2)
Expand = True
{ Panel15 Panel
MoveScaled(1,52,35,2)
}
{ HBox2 HBox
MoveScaled(2,55,33,4)

View file

@ -109,7 +109,7 @@ End
Public Sub Area_MouseWheel()
Print "wheel"
If Not $hView.Arrangement = Arrange.Row Then
$hView.Arrangement = Arrange.Row
$hView.Column = 0

View file

@ -1,8 +1,8 @@
Report8
Report11
ReportsEvolution
0
0
3.8.0
3.8.90
gb.image
gb.gui