[SIZE=2][COLOR=#0000ff]Private[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]Sub[/COLOR][/SIZE][SIZE=2] pdReport_PrintPage([/SIZE][SIZE=2][COLOR=#0000ff]ByVal[/COLOR][/SIZE][SIZE=2] sender [/SIZE][SIZE=2][COLOR=#0000ff]As[/COLOR][/SIZE][SIZE=2] System.Object, [/SIZE][SIZE=2][COLOR=#0000ff]ByVal[/COLOR][/SIZE][SIZE=2] e [/SIZE][SIZE=2][COLOR=#0000ff]As[/COLOR][/SIZE][SIZE=2] System.Drawing.Printing.PrintPageEventArgs) [/SIZE][SIZE=2][COLOR=#0000ff]Handles[/COLOR][/SIZE][SIZE=2] pdReport.PrintPage
[/SIZE][SIZE=2][COLOR=#0000ff]Dim[/COLOR][/SIZE][SIZE=2] pintYear [/SIZE][SIZE=2][COLOR=#0000ff]As[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]Integer
[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]Dim[/COLOR][/SIZE][SIZE=2] pdblInitialValue [/SIZE][SIZE=2][COLOR=#0000ff]As[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]Double
[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]Dim[/COLOR][/SIZE][SIZE=2] pdblAssetLife [/SIZE][SIZE=2][COLOR=#0000ff]As[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]Double
[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]Dim[/COLOR][/SIZE][SIZE=2] pdblSalvageValue [/SIZE][SIZE=2][COLOR=#0000ff]As[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]Double
[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]Dim[/COLOR][/SIZE][SIZE=2] pdblTotalDepreciation [/SIZE][SIZE=2][COLOR=#0000ff]As[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]Double
[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]Dim[/COLOR][/SIZE][SIZE=2] pdblAnnualDepreciation [/SIZE][SIZE=2][COLOR=#0000ff]As[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]Double
[/COLOR][/SIZE][SIZE=2]
[/SIZE][SIZE=2][COLOR=#0000ff]Dim[/COLOR][/SIZE][SIZE=2] pintLinesPerPage [/SIZE][SIZE=2][COLOR=#0000ff]As[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]Integer
[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]Dim[/COLOR][/SIZE][SIZE=2] PintTotalLines [/SIZE][SIZE=2][COLOR=#0000ff]As[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]Integer
[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]Dim[/COLOR][/SIZE][SIZE=2] PintCurrentLine [/SIZE][SIZE=2][COLOR=#0000ff]As[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]Integer
[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]Call[/COLOR][/SIZE][SIZE=2] PrintPageTitles(e)
pintLinesPerPage = ToInt32(e.MarginBounds.Height / _
msngFontHeight) - 6
PintTotalLines = mdblDepreciation
msngPages = ToSingle(PintTotalLines / pintLinesPerPage + 1)
[/SIZE][SIZE=2][COLOR=#0000ff]If[/COLOR][/SIZE][SIZE=2] msngCurrentPage <= msngPages [/SIZE][SIZE=2][COLOR=#0000ff]Then
[/COLOR][/SIZE][SIZE=2]msngYPos = e.MarginBounds.Top + (msngFontHeight * 5)
[/SIZE][SIZE=2][COLOR=#0000ff]End[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]If
[/COLOR][/SIZE][SIZE=2]msngYPos += mfntPrint.GetHeight(e.Graphics)
[/SIZE][SIZE=2][COLOR=#0000ff]Call[/COLOR][/SIZE][SIZE=2] DrawStringInBox(e, cintCol1Start, msngYPos, _
cintColWidth, msngYPos + msngFontHeight, _
mintCurrentYear.ToString("###"))
[/SIZE][SIZE=2][COLOR=#0000ff]
Call[/COLOR][/SIZE][SIZE=2] DrawStringInBox(e, cintCol2Start, msngYPos, _
cintColWidth, msngYPos + msngFontHeight, _
mdblInitialValue.ToString("###,###.00"))
mdblDepreciation = mdblInitialValue - mdblSalvageValue / 10
[/SIZE][SIZE=2][COLOR=#0000ff]Call[/COLOR][/SIZE][SIZE=2] DrawStringInBox(e, cintCol3Start, msngYPos, _
cintColWidth, msngYPos + msngFontHeight, _
mdblDepreciation.ToString("###,###.00"))
[/SIZE][SIZE=2][COLOR=#0000ff]Call[/COLOR][/SIZE][SIZE=2] DrawStringInBox(e, cintCol4Start, msngYPos, _
cintColWidth, msngYPos + msngFontHeight, _
mdblEndValue.ToString("###,###.00"))
mintCurrentYear += 1
[/SIZE][SIZE=2][COLOR=#0000ff]If[/COLOR][/SIZE][SIZE=2] mdblInitialValue + mdblSalvageValue < mdblDepreciation [/SIZE][SIZE=2][COLOR=#0000ff]Then
[/COLOR][/SIZE][SIZE=2]msngYPos += mfntPrint.GetHeight(e.Graphics) * 2
[/SIZE][SIZE=2][COLOR=#0000ff]Call[/COLOR][/SIZE][SIZE=2] DrawStringInBox(e, cintCol3Start, _
msngYPos, cintColWidth, _
msngYPos + msngFontHeight, _
mdblDepreciation.ToString("###,##.00"))
e.HasMorePages = [/SIZE][SIZE=2][COLOR=#0000ff]True
[/COLOR][/SIZE][SIZE=2]mdblInitialValue = ToInt32(txtInitialValue.Text)
mdblSalvageValue = ToDouble(txtSalvageValue.Text)
mdblAssetLife = ToDouble(txtAssetLife.Text)
mdblTotalDepreciation = mdblInitialValue - mdblSalvageValue
mdblAnnualDepreciation = mdblTotalDepreciation \ mdblAssetLife
[/SIZE][SIZE=2][COLOR=#0000ff]End[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]If
[/COLOR][/SIZE][SIZE=2]msngCurrentPage += 1
e.HasMorePages = [/SIZE][SIZE=2][COLOR=#0000ff]False
[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]End[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]Sub