[GB.REPORT]
* OPT: Continue to modify the preview dialog * NEW: _Similar property is filled git-svn-id: svn://localhost/gambas/trunk@3769 867c0c6c-44f3-4631-809d-bfa615b0a4ec
This commit is contained in:
parent
527e7782e5
commit
b947d1f8f9
14 changed files with 142 additions and 112 deletions
|
@ -98,22 +98,6 @@ i
|
|||
#Paint
|
||||
|
||||
C
|
||||
Begin
|
||||
M
|
||||
|
||||
(Device)o
|
||||
End
|
||||
M
|
||||
|
||||
(Device)o
|
||||
Rectangle
|
||||
M
|
||||
|
||||
(X)f(Y)f(W)f(H)f
|
||||
Text
|
||||
M
|
||||
|
||||
(Text)s[(X)f(Y)f(Width)f(Height)f(Alignment)i]
|
||||
#Report
|
||||
ReportSection
|
||||
CA
|
||||
|
@ -759,6 +743,10 @@ _Properties
|
|||
C
|
||||
s
|
||||
*
|
||||
_Similar
|
||||
C
|
||||
s
|
||||
ReportVBox
|
||||
_new
|
||||
m
|
||||
|
||||
|
@ -782,6 +770,10 @@ _Properties
|
|||
C
|
||||
s
|
||||
*,Image{Image}
|
||||
_Similar
|
||||
C
|
||||
s
|
||||
ReportTextLabel
|
||||
Image
|
||||
p
|
||||
Image
|
||||
|
@ -801,6 +793,10 @@ _Properties
|
|||
C
|
||||
s
|
||||
*,Text,Key,Format,Alignment{Align.*},UseField
|
||||
_Similar
|
||||
C
|
||||
s
|
||||
ReportTextLabel
|
||||
Text
|
||||
p
|
||||
s
|
||||
|
@ -840,6 +836,10 @@ _Properties
|
|||
C
|
||||
s
|
||||
*,Direction{Align.TopLeft;Top;TopRight;Left;Right;BottomLeft;Bottom;BottomRight}=BottomRight,LineWidth{ReportCoord}=2 px
|
||||
_Similar
|
||||
C
|
||||
s
|
||||
ReportTextLabel
|
||||
Direction
|
||||
p
|
||||
i
|
||||
|
@ -878,6 +878,10 @@ s
|
|||
#ReportSvgImage
|
||||
ReportControl
|
||||
C
|
||||
_Similar
|
||||
C
|
||||
s
|
||||
ReportTextLabel
|
||||
Path
|
||||
p
|
||||
s
|
||||
|
@ -897,6 +901,10 @@ _Properties
|
|||
C
|
||||
s
|
||||
*,Text,Alignment{Align.*}
|
||||
_Similar
|
||||
C
|
||||
s
|
||||
ReportControl
|
||||
Text
|
||||
p
|
||||
s
|
||||
|
@ -924,6 +932,10 @@ _Properties
|
|||
C
|
||||
s
|
||||
*
|
||||
_Similar
|
||||
C
|
||||
s
|
||||
ReportVBox
|
||||
_new
|
||||
m
|
||||
|
||||
|
|
|
@ -26,8 +26,10 @@ Public Sub DrawingArea1_Draw()
|
|||
'Debug $fScale
|
||||
'Paint.Scale($fScale, $fScale)
|
||||
'$hreport.Layout
|
||||
|
||||
$hReport.Scale = $fScale
|
||||
$hReport.Paint($iPage)
|
||||
Label2.Text = "/" & $hreport.PageCount
|
||||
SpinBox1.MaxValue = $hReport.PageCount
|
||||
End
|
||||
|
||||
|
@ -38,6 +40,7 @@ Public Sub Form_Open()
|
|||
'Report.Debug = True
|
||||
|
||||
|
||||
|
||||
btnAdjust.Value = True
|
||||
'Resize
|
||||
Printer1.OutputFile = User.Home &/ "output.pdf"
|
||||
|
|
|
@ -16,12 +16,8 @@
|
|||
Text = ("Print")
|
||||
Picture = Picture["icon:/22/printer"]
|
||||
}
|
||||
{ SpinBox1 SpinBox
|
||||
MoveScaled(6,0,6,4)
|
||||
MinValue = 1
|
||||
}
|
||||
{ HBox3 HBox
|
||||
MoveScaled(12,1,20,2)
|
||||
MoveScaled(32,1,20,2)
|
||||
Expand = True
|
||||
}
|
||||
{ btnAdjust ToolButton
|
||||
|
@ -54,11 +50,11 @@
|
|||
}
|
||||
}
|
||||
{ HBox2 HBox
|
||||
MoveScaled(3,7,128,50)
|
||||
MoveScaled(2,5,128,36)
|
||||
Expand = True
|
||||
Padding = 5
|
||||
{ ScrollView1 ScrollView
|
||||
MoveScaled(1,1,82,38)
|
||||
MoveScaled(1,1,82,32)
|
||||
Background = Color.Background
|
||||
Expand = True
|
||||
{ DrawingArea1 DrawingArea
|
||||
|
@ -69,6 +65,27 @@
|
|||
}
|
||||
}
|
||||
}
|
||||
{ Panel2 Panel
|
||||
MoveScaled(4,49,90,4)
|
||||
Arrangement = Arrange.Horizontal
|
||||
Border = Border.Plain
|
||||
{ HBox1 HBox
|
||||
MoveScaled(8,0,36,3)
|
||||
Expand = True
|
||||
}
|
||||
{ Label1 Label
|
||||
MoveScaled(55,0,5,4)
|
||||
AutoResize = True
|
||||
Text = ("Page : ")
|
||||
}
|
||||
{ SpinBox1 SpinBox
|
||||
MoveScaled(64,0,6,4)
|
||||
MinValue = 1
|
||||
}
|
||||
{ Label2 Label
|
||||
MoveScaled(70,0,6,4)
|
||||
}
|
||||
}
|
||||
{ Printer1 #Printer
|
||||
#MoveScaled(111,58)
|
||||
FullPage = True
|
||||
|
|
|
@ -122,7 +122,7 @@ Public Sub Layout()
|
|||
'Me._SetUnifiedValues()
|
||||
'Me._GenerateClones()
|
||||
'$hReportTControl.ctrl = Me
|
||||
Debug "Page Size W/H: " & Round(Me._Width, -2) & "/" & Round(Me._Height, -2)
|
||||
'Debug "Page Size W/H: " & Round(Me._Width, -2) & "/" & Round(Me._Height, -2)
|
||||
iCurPage = -1
|
||||
For Each Tsection In $aSections
|
||||
CSection = TSection.Ctrl
|
||||
|
@ -141,7 +141,7 @@ Public Sub Layout()
|
|||
'Inc iCurPage
|
||||
Next
|
||||
|
||||
Debug Me._PageChildren.Count
|
||||
'Debug Me._PageChildren.Count
|
||||
$iPageCount = iCurPage + 1
|
||||
'MTools.PageCount = $iCount
|
||||
$bLayoutIsDirty = False
|
||||
|
|
|
@ -30,6 +30,7 @@ Public Function _PaintBrush(X1 As Integer, Y1 As Integer, X2 As Integer, Y2 As I
|
|||
fradius = Width * _radius
|
||||
hBrush = paint.RadialGradient(Width * _X, Height * _Y, fradius, Width * _X2, Height * _Y2, _Color, _Pos)
|
||||
End Select
|
||||
hBrush.Translate(x1, Y1)
|
||||
Return hBrush
|
||||
|
||||
End
|
||||
|
|
|
@ -5,7 +5,7 @@ Export
|
|||
Inherits ReportContainer
|
||||
|
||||
Public Const _Properties As String = "*"
|
||||
|
||||
Public Const _Similar As String = "ReportVBox"
|
||||
Public Sub _new()
|
||||
|
||||
Super._Arrangement = Arrange.Horizontal
|
||||
|
|
|
@ -3,7 +3,7 @@ Export
|
|||
Inherits ReportControl
|
||||
|
||||
Public Const _Properties As String = "*,Image{Image}"
|
||||
|
||||
Public Const _Similar As String = "ReportTextLabel"
|
||||
Private $hPic As Image
|
||||
|
||||
Property Image As Image
|
||||
|
|
|
@ -4,7 +4,7 @@ Export
|
|||
Inherits ReportFrame
|
||||
|
||||
Public Const _Properties As String = "*,Text,Key,Format,Alignment{Align.*},UseField"
|
||||
|
||||
Public Const _Similar As String = "ReportTextLabel"
|
||||
Private $sText As String
|
||||
Private $iAlignment As Integer = Align.Normal
|
||||
Private $bIsSpecial As Boolean
|
||||
|
|
|
@ -4,7 +4,7 @@ Export
|
|||
Inherits ReportControl
|
||||
|
||||
Public Const _Properties As String = "*,Direction{Align.TopLeft;Top;TopRight;Left;Right;BottomLeft;Bottom;BottomRight}=BottomRight,LineWidth{ReportCoord}=2 px"
|
||||
|
||||
Public Const _Similar As String = "ReportTextLabel"
|
||||
Property Direction As Integer
|
||||
|
||||
Private $fLineWidth As Float = 1.0
|
||||
|
|
|
@ -5,7 +5,7 @@ Inherits ReportControl
|
|||
|
||||
Private $hSvgImage As SvgImage
|
||||
Private $sPath As String
|
||||
|
||||
Public Const _Similar As String = "ReportTextLabel"
|
||||
Property Path As String
|
||||
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@ Export
|
|||
Inherits ReportFrame
|
||||
|
||||
Public Const _Properties As String = "*,Text,Alignment{Align.*}"
|
||||
|
||||
Public Const _Similar As String = "ReportControl"
|
||||
Property Text As String
|
||||
Property Alignment As Integer
|
||||
Property WordWrap As Boolean
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
Export
|
||||
Inherits ReportContainer
|
||||
Public Const _Properties As String = "*"
|
||||
|
||||
Public Const _Similar As String = "ReportVBox"
|
||||
Public Sub _new()
|
||||
|
||||
Super._Arrangement = Arrange.Vertical
|
||||
|
|
|
@ -2,32 +2,32 @@
|
|||
|
||||
Export
|
||||
|
||||
Static Public Sub Begin(Device As Object)
|
||||
|
||||
Debug
|
||||
Super.Begin(Device)
|
||||
|
||||
End
|
||||
|
||||
Static Public Sub End(Device As Object)
|
||||
|
||||
Debug
|
||||
Super.End(Device)
|
||||
|
||||
End
|
||||
|
||||
|
||||
Static Public Sub Rectangle(X As Float, Y As Float, W As Float, H As Float)
|
||||
|
||||
'Debug CStr(X); ", "; CStr(Y); ", "; CStr(W); ", "; CStr(H)
|
||||
Super.Rectangle(X, Y, W, H)
|
||||
|
||||
End
|
||||
|
||||
|
||||
Static Public Sub Text(Text As String, Optional X As Float, Y As Float, Width As Float, Height As Float, Alignment As Integer)
|
||||
|
||||
'Debug Paint.Font.Size
|
||||
Super.Text(Text, X, Y, Width, Height, Alignment)
|
||||
|
||||
End
|
||||
' Static Public Sub Begin(Device As Object)
|
||||
'
|
||||
' Debug
|
||||
' Super.Begin(Device)
|
||||
'
|
||||
' End
|
||||
'
|
||||
' Static Public Sub End(Device As Object)
|
||||
'
|
||||
' Debug
|
||||
' Super.End(Device)
|
||||
'
|
||||
' End
|
||||
'
|
||||
'
|
||||
' Static Public Sub Rectangle(X As Float, Y As Float, W As Float, H As Float)
|
||||
'
|
||||
' 'Debug CStr(X); ", "; CStr(Y); ", "; CStr(W); ", "; CStr(H)
|
||||
' Super.Rectangle(X, Y, W, H)
|
||||
'
|
||||
' End
|
||||
'
|
||||
'
|
||||
' Static Public Sub Text(Text As String, Optional X As Float, Y As Float, Width As Float, Height As Float, Alignment As Integer)
|
||||
'
|
||||
' 'Debug Paint.Font.Size
|
||||
' Super.Text(Text, X, Y, Width, Height, Alignment)
|
||||
'
|
||||
' End
|
||||
|
|
|
@ -6,60 +6,57 @@
|
|||
Spacing = "2cm"
|
||||
Index = 0
|
||||
Text = ("Section 1")
|
||||
{ ReportHBox1 ReportHBox
|
||||
#MoveScaled(4,2,90,40)
|
||||
Fixed = True
|
||||
AutoResize = True
|
||||
Spacing = "4cm"
|
||||
{ ReportVBox2 ReportVBox
|
||||
#MoveScaled(32,2,56,36)
|
||||
Fixed = True
|
||||
Expand = True
|
||||
Background = ReportBrush["RadialGradient(0.52,0.54,0.28,0.52,0.54,[#FF00FF,#FFFFFF],[0,1])"]
|
||||
#MoveScaled(4,4,80,42)
|
||||
{ ReportLabel9 ReportLabel
|
||||
#MoveScaled(1,1,54,18)
|
||||
Font = Font["Bitstream Charter,+8"]
|
||||
Padding = "2mm"
|
||||
Border = ReportBorder["Top:0.5mm #000000;Bottom:0.5mm #000000;Left:0.5mm #000000;Right:0.5mm #000000"]
|
||||
Background = ReportBrush["#E07FFF00"]
|
||||
Text = ("FACTURE")
|
||||
#MoveScaled(0,0,68,7)
|
||||
Fixed = True
|
||||
Font = Font["Bitstream Charter,+11"]
|
||||
Border = ReportBorder["Top:1mm #000000;Bottom:1mm #000000;Left:1mm #000000;Right:1mm #000000"]
|
||||
Background = ReportBrush["#007FFF"]
|
||||
Text = ("Facture")
|
||||
Alignment = Align.Center
|
||||
}
|
||||
{ ReportHBox1 ReportHBox
|
||||
#MoveScaled(1,9,72,25)
|
||||
Height = "2cm"
|
||||
Padding = "1mm"
|
||||
Expand = True
|
||||
Border = ReportBorder["Bottom:1mm #000000;Left:1mm #000000;Right:1mm #000000"]
|
||||
{ ReportHBox5 ReportHBox
|
||||
#MoveScaled(13,22,5,2)
|
||||
Height = "5mm"
|
||||
#MoveScaled(2,1,34,15)
|
||||
Expand = True
|
||||
}
|
||||
{ ReportLabel10 ReportLabel
|
||||
#MoveScaled(4,26,31,3)
|
||||
{ ReportVBox3 ReportVBox
|
||||
#MoveScaled(37,2,34,16)
|
||||
Expand = True
|
||||
AutoResize = True
|
||||
{ Nom ReportLabel
|
||||
#MoveScaled(2,1,28,3)
|
||||
Key = "nom"
|
||||
}
|
||||
{ ReportLabel11 ReportLabel
|
||||
#MoveScaled(4,29,32,3)
|
||||
{ Adresse ReportLabel
|
||||
#MoveScaled(2,6,28,3)
|
||||
Key = "adresse"
|
||||
}
|
||||
{ ReportHBox6 ReportHBox
|
||||
#MoveScaled(4,29,41,5)
|
||||
AutoResize = True
|
||||
Tag = "*"
|
||||
#MoveScaled(1,9,30,5)
|
||||
Expand = True
|
||||
Spacing = "2mm"
|
||||
{ ReportLabel12 ReportLabel
|
||||
#MoveScaled(2,0,12,3)
|
||||
Width = "3cm"
|
||||
AutoResize = True
|
||||
Border = ReportBorder["Right= &H00000000&; "]
|
||||
{ CP ReportLabel
|
||||
#MoveScaled(2,1,10,2)
|
||||
Key = "CP"
|
||||
}
|
||||
{ ReportLabel13 ReportLabel
|
||||
#MoveScaled(19,1,18,3)
|
||||
Width = "3cm"
|
||||
AutoResize = True
|
||||
{ ville ReportLabel
|
||||
#MoveScaled(13,1,16,3)
|
||||
Key = "ville"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
{ ReportVBox1 ReportVBox
|
||||
#MoveScaled(6,48,90,42)
|
||||
#MoveScaled(9,48,90,42)
|
||||
Expand = True
|
||||
{ ReportHBox2 ReportHBox
|
||||
#MoveScaled(2,0,86,5)
|
||||
|
@ -79,7 +76,7 @@
|
|||
#MoveScaled(22,1,13,4)
|
||||
Width = "3cm"
|
||||
Font = Font["Bitstream Charter,Bold"]
|
||||
Border = ReportBorder["Top=1mm &H00000000&; Right= &H00000000&; Bottom=1mm &H00000000&; Left=1mm &H00000000&; "]
|
||||
Border = ReportBorder["Left:1mm #000000"]
|
||||
Text = ("PU HT")
|
||||
Alignment = Align.Center
|
||||
}
|
||||
|
@ -88,7 +85,7 @@
|
|||
Width = "3cm"
|
||||
Font = Font["Bitstream Charter,Bold"]
|
||||
Tag = "*"
|
||||
Border = ReportBorder["Top=1mm &H00000000&; Right= &H00000000&; Bottom=1mm &H00000000&; Left=1mm &H00000000&; "]
|
||||
Border = ReportBorder["Left:1mm #000000"]
|
||||
Text = ("Quantité")
|
||||
Alignment = Align.Center
|
||||
}
|
||||
|
@ -96,7 +93,7 @@
|
|||
#MoveScaled(52,1,13,4)
|
||||
Width = "3cm"
|
||||
Font = Font["Bitstream Charter,Bold"]
|
||||
Border = ReportBorder["Border=1mm &H00000000&;"]
|
||||
Border = ReportBorder["Left:1mm #000000"]
|
||||
Text = ("Total HT")
|
||||
Alignment = Align.Center
|
||||
}
|
||||
|
@ -109,14 +106,14 @@
|
|||
Width = "40%"
|
||||
Padding = "1mm"
|
||||
Expand = True
|
||||
Border = ReportBorder["Bottom= &H00000000&; Left=1mm &H00000000&; "]
|
||||
Border = ReportBorder["Left:1mm #000000"]
|
||||
Key = "designation"
|
||||
}
|
||||
{ ReportLabel6 ReportLabel
|
||||
#MoveScaled(22,1,13,4)
|
||||
Width = "3cm"
|
||||
Padding = "1mm"
|
||||
Border = ReportBorder["Right= &H00000000&; Left=1mm &H00000000&; "]
|
||||
Border = ReportBorder["Left:1mm #000000"]
|
||||
Key = "PU"
|
||||
Alignment = Align.Right
|
||||
}
|
||||
|
@ -124,14 +121,14 @@
|
|||
#MoveScaled(35,1,13,4)
|
||||
Width = "3cm"
|
||||
Padding = "1mm"
|
||||
Border = ReportBorder["Right= &H00000000&; Left=1mm &H00000000&; "]
|
||||
Border = ReportBorder["Left:1mm #000000"]
|
||||
Key = "Q"
|
||||
Alignment = Align.Right
|
||||
}
|
||||
{ ReportLabel8 ReportLabel
|
||||
#MoveScaled(52,1,13,4)
|
||||
Width = "3cm"
|
||||
Border = ReportBorder["Right=1mm &H00000000&; Left=1mm &H00000000&; "]
|
||||
Border = ReportBorder["Left:1mm #000000;Right:1mm #000000"]
|
||||
Key = "THT"
|
||||
Alignment = Align.Right
|
||||
}
|
||||
|
@ -139,7 +136,7 @@
|
|||
{ ReportHBox8 ReportHBox
|
||||
#MoveScaled(3,13,83,2)
|
||||
Fixed = True
|
||||
Border = ReportBorder["Top=1mm &H00000000&; "]
|
||||
Border = ReportBorder["Top:1mm #000000"]
|
||||
}
|
||||
{ ReportHBox4 ReportHBox
|
||||
#MoveScaled(4,17,81,5)
|
||||
|
|
Loading…
Reference in a new issue