本文整理匯總了Golang中github.com/mikeshimura/goreport.GoReport.Cell方法的典型用法代碼示例。如果您正苦於以下問題:Golang GoReport.Cell方法的具體用法?Golang GoReport.Cell怎麽用?Golang GoReport.Cell使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類github.com/mikeshimura/goreport.GoReport
的用法示例。
在下文中一共展示了GoReport.Cell方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Golang代碼示例。
示例1: Execute
func (h M1G2Summary) Execute(report gr.GoReport) {
report.Cell(150, 2, "Dept Total")
report.CellRight(180, 2, 30, strconv.FormatFloat(
report.SumWork["g2cum"], 'f', 2, 64))
report.SumWork["g2cum"] = 0.0
//Force New Page
report.NewPage(false)
}
示例2: Execute
func (h C1G1Header) Execute(report gr.GoReport) {
cols := report.Records[report.DataPos].([]string)
y := 2.0
report.Font("MPBOLD", 9, "")
report.Cell(14, y, "SUB-TASK")
report.Cell(40, y, cols[4])
report.LineType("straight", 1)
report.GrayStroke(0.9)
report.LineH(11, 7, 199)
report.GrayStroke(0)
}
示例3: Execute
func (h C2G1Summary) Execute(report gr.GoReport) {
x := 25.0
y := 1.5
report.LineType("straight", 5)
report.GrayStroke(0.85)
report.LineH(x, 0, x+160)
report.LineType("straight", 0.3)
report.GrayStroke(0)
report.Rect(x, 0, x+160, 5)
report.Font("IPAexゴシック", 10, "")
report.CellRight(x+159, y, 0, "\u00A5"+gr.AddComma(
strconv.FormatFloat(report.SumWork["g1amtcum"], 'f', 0, 64)))
report.Cell(x+117, y, "伝票合計")
report.SumWork["g1amtcum"] = 0.0
report.SumWork["g1item"] = 0.0
}
示例4: Execute
func (h S1Detail) Execute(report gr.GoReport) {
cols := report.Records[report.DataPos].([]string)
report.Font("IPAexG", 12, "")
y := 2.0
report.Cell(15, y, cols[0])
report.Cell(30, y, cols[1])
report.Cell(60, y, cols[2])
report.Cell(90, y, cols[3])
report.Cell(120, y, cols[4])
report.CellRight(135, y, 25, cols[5])
report.CellRight(160, y, 20, cols[6])
amt := ParseFloatNoError(cols[5]) * ParseFloatNoError(cols[6])
report.SumWork["amountcum="] += amt
report.CellRight(180, y, 30, strconv.FormatFloat(amt, 'f', 2, 64))
}