Hello,
I'm trying to set a table that overflows on multiple pages. All is working correctly except that on the initial page my table is not at the top, so every new page, the table is not at the top. And i absolutely want that table begin at the top for the next pages.
Do you understand what i say ?
Sorry for my bad english, i'm from switzerland.
Thanks in advance,
netsuo
x-position of the Overflowed table
Re: x-position of the Overflowed table
Forum member · Apr 1, 2006Are you defining the page size when you post it to the page? Or the start position?
set myfso = server.createobject("scripting.filesystemobject")
set stmt = myfso.opentextfile(sStmtfile,1,0)
do until stmt.atendofstream
temp = stmt.readline
if instr(temp, chr(12)) then
addpage = 1
' Sets the top of the printing
set mytextarea = mypage.addtextarea(pagestmttext, 0,0,500,792)
mytextarea.font = DPDF_Font_Courier
mytextarea.fontsize = 11
'addstmtpage
end if
if addpage = 1 then
addstmtpage
addpage = 0
pagestmttext = ""
end if
pagestmttext = pagestmttext & temp & chr(13)
'response.write temp & "<br>"
if stmt.atendofstream then
set mytextarea = mypage.addtextarea(pagestmttext, 0,0,500,792)
mytextarea.font = DPDF_Font_Courier
mytextarea.fontsize = 11
end if
loop
Function AddStmtpage()
set mypage = mydocument.addpage()
mypage.margintop = 0 ' 1/4 inch = 18 pts
mypage.marginbottom = 0 ' 1 inch = 72 pts
mypage.marginleft = 45
mypage.marginright = 0
End Function
Brad
Re: x-position of the Overflowed table
Forum member · Apr 1, 2006Here's my code:
Set sTBL = sPGE.AddTable( -1*RAPPORT, 151.5*RAPPORT, 164*RAPPORT, 105*RAPPORT )
sTBL.Padding = 5
sTBL.AddColumn ( 82*RAPPORT )
sTBL.AddColumn ( 82*RAPPORT )
Set sROW = sTBL.AddRow( DPDF_Font_Helvetica, 11 , "000000", "FFFFFF" )
sROW.Align = DPDF_Align_Left
sROW.VAlign = DPDF_VAlign_Center
sROW.Height = 6*RAPPORT
sROW.AddCell ( "Questions préparées" ) : sROW.AddCell ( "Remarques" )
For i = 0 To 7
Set sROW = sTBL.AddRow( DPDF_Font_Helvetica, 9 , "000000", "FFFFFF" )
sROW.Align = DPDF_Align_Left
sROW.VAlign = DPDF_VAlign_Center
sROW.Height = 25*RAPPORT
sROW.AddCell ( "<=RS('FORM_2P3_Q_'&(i+1))>" ) : sROW.AddCell ( "<=RS('FORM_2P3_R_'&(i+1))>" )
Next
Do
Set sTBO = sTBL.GetOverflowRows()
If Not( sTBO Is Nothing ) Then
Set sPGE = sDOC.AddPage()
sTBL.X = 0
sPGE.PageHeight = 297*RAPPORT
sPGE.PageWidth = 210*RAPPORT
sPGE.MarginLeft = 30*RAPPORT
sPGE.MarginRight = 20*RAPPORT
sPGE.MarginTop = 18*RAPPORT
sPGE.MarginBottom = 18*RAPPORT
Set sTBL = sPGE.AddOverflowTable( sTBO )
End if
Loop While Not( sTBO Is Nothing )
In this case, in the table's the second page, the X position of the table is the same as in the first page. But i want it to start at the top...
Re: x-position of the Overflowed table
Forum member · Apr 2, 2006Nevermind, i've found the error..
That was a pretty stupid error.. "speed coding" you know :)
"sTBL.X = 0 "
should be
"sTBL.Y = 0 "
And that's all !
Thanks anyway for your help.