[quote=317467:@Jeff Tullin]dim numrows as integer
dim rowheight as integer
dim titletop as integer
dim topmargin , bottommargin as integer
dim rowpos as integer
topmargin = 5
rowheight = 14
bottommargin = 20
titletop = topmargin + rowheight
numrows =( g.height - rowheight - topmargin - bottommargin ) / heightofrow
numrows = numrows -1
rowpos = heightoftitle + heightofrow * 2
//repeat this part for as many pages as you need
g.textsize = rowheight -2
g.drawstring “Column1”, col1Left, titletop
g.drawstring “Column2”, col2Left, titletop
for x as integer = 1 to numrows
g.drawstring value1(x), col1Left, rowpos
g.drawstring value2(x), col2Left, rowpos
rowpos = rowpos + heightofrow
next[/quote]
Hi Jeff,
I did not quite get that but thanks a lot, i`ll try to look into the code and see how i can adapt the data , so far i save a simple data fetch and post :
[code] dim rpt As New rptColorList
dim colorList As RecordSet
colorList = App.aDB.GetColorList
If colorList = Nil Then
Beep
MsgBox("Color list table is empty, no records found to print.")
Else
dim ps As New PrinterSetup
ps.MaxHorizontalResolution = 600
ps.MaxVerticalResolution = 600
If ps.PageSetupDialog Then
Dim g As Graphics
g = OpenPrinterDialog(ps, Nil)
If g <> Nil Then
If rpt.Run(colorList, ps) Then
rpt.Document.Print(g)
End If
End If
End If
End If[/code]
and on the report i have 2 fields one for id and one for color , so the id has to be next to the right , like 33 has to be on the same row as 1 i assume that it is possible but you will have to define the columns, and then to calculate the field size and to add them while they come , once they don`t fit anymore move them to the column 2 . In the report fields i have as DataField “id” for the Color ID and “color” for the Color name , i should add those dynamically on the code ? and duplicate the fields ?
Thanks again.