Foster,
It can be a bit tricky getting multiple records on a page. I wrote some code to get you started. It is a Mass Update written to run against the Customers sample application that comes with Sesame.
GLOBAL CODE:
stat vHeader as String
stat vNumPerPage as Int
stat vNumRowsPerRecord as Int
stat vCnt as Int
stat vFace as String
stat vSize as String
// Change these to suit your needs
vHeader = "This is my header." + @NewLine() + "It has two lines."
vNumPerPage = 6
vNumRowsPerRecord = 8
vFace = " Arial"
vSize = "15"
vCnt = 0
ANY OTHER ELEMENT:
var vYPos as Int
var vLSize as Int
vLSize = @ToNumber(vSize)
If vCnt = 0
{
vYPos = 100
}
Else
{
vYPos = 100 + (((vNumRowsPerRecord + 2) * vCnt) * vLSize)
}
vCnt = vCnt + 1
If vCnt = 1
{
NewPage(850, 1100)
PrintString(vHeader, 100, 50, 0, vFace, vSize, 0)
}
// Row 1
PrintString(Key, 100, vYPos, 0, vFace, vSize, 0)
PrintString(First, 200, vYPos, 0, vFace, vSize, 0)
PrintString(MI, 350, vYPos, 0, vFace, vSize, 0)
PrintString(Last, 400, vYPos, 0, vFace, vSize, 0)
// Row 2
PrintString(Company, 100, vYPos + vLSize, 0, vFace, vSize, 0)
// Row 3
PrintString(Add1, 100, vYPos + (vLSize * 2), 0, vFace, vSize, 0)
// Row 4
PrintString(Add2, 100, vYPos + (vLSize * 3), 0, vFace, vSize, 0)
// Row 5
PrintString(City, 100, vYPos + (vLSize * 4), 0, vFace, vSize, 0)
PrintString(State, 300, vYPos + (vLSize * 4), 0, vFace, vSize, 0)
PrintString(Zip, 400, vYPos + (vLSize * 4), 0, vFace, vSize, 0)
// Row 6
PrintString(Phone, 100, vYPos + (vLSize * 5), 0, vFace, vSize, 0)
// Row 7
PrintString(EMail, 100, vYPos + (vLSize * 6), 0, vFace, vSize, 0)
// Row 8
PrintString(Position, 100, vYPos + (vLSize * 7), 0, vFace, vSize, 0)
// Separator
PrintString(@Txt(50, "-"), 100, vYPos + (vLSize * 8), 0, vFace, vSize, 0)
If ((@ResultSetCurrentPosition() = @ResultSetTotal()) Or (vCnt = vNumPerPage))
{
FinishPage()
vCnt = 0
}