New topic: printing g.nextpage
<http://forums.realsoftware.com/viewtopic.php?t=32256> Page 1 of 1 [ 2 posts ] Previous topic | Next topic Author Message markh2009 Post subject: printing g.nextpagePosted: Fri Jan 29, 2010 9:10 pm Joined: Wed May 06, 2009 1:54 am Posts: 31 Hi i am having difficulty with the g.nextpage location in my code. I am trying to print a form [order form] & I can have a lot of items in a listbox. When the data should continue to the next page it only ever prints the first page. here is my code & i am hoping that someone can point me in the right direction. Code:dim g as graphics dim stp as styledTextPrinter dim stp1 as styledTextPrinter dim stp2 as styledTextPrinter dim stp3 as styledTextPrinter dim stp4 as styledTextPrinter dim stp5 as styledTextPrinter dim stp6 as styledTextPrinter dim stp7 as styledTextPrinter dim stp8 as styledTextPrinter dim stp9 as styledTextPrinter dim stp10 as styledTextPrinter dim stp11 as styledTextPrinter dim stp12 as styledTextPrinter dim stp13 as styledTextPrinter dim stp14 as styledTextPrinter dim stp15 as styledTextPrinter dim stp16 as styledTextPrinter dim stp17 as styledTextPrinter Dim yRow, xCounter, yCounter as Integer Dim xColumnWidth (4) As Integer Dim prt as PrinterSetup prt = New PrinterSetup g=openPrinterDialog() if g <> nil then g.TextSize=10 yRow = 330 xColumnWidth()=array(50,115,205,230,250) For yCounter = 0 to stkorderList.ListCount - 1 yRow = yRow + g.TextSize + 2 For xCounter = 0 to 4 g.DrawString StkorderList.Cell(yCounter, xCounter), xCounter+xColumnWidth(xCounter), yRow Next xCounter Next yCounter g.DrawString "Supplier Number",100, 151 g.DrawString "Supplier Name", 100, 161 g.DrawString "Address",100, 171 g.DrawString "City", 100, 181 g.DrawString "State", 100, 191 g.DrawString "Post Code", 100,201 g.DrawString "Country", 100, 211 g.DrawString "Order Date",100, 221 g.DrawString "Order Number",100, 241 g.DrawString "Est Delivery Date",100, 231 g.DrawString "Comments",50, 261 g.DrawString "-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------",50, 268 g.DrawString "-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------",50, 322 g.DrawString "Prod Number",50,331 g.DrawString "Size",205, 331 g.DrawString "Qty",230, 331 g.DrawString "Description",255, 331 g.DrawString "ReOrder Code",115, 331 g.DrawString "DELIVER TO:",420, 141 stp=StkSuppId.styledTextPrinter(g,72*7.5) stp.drawBlock 200,141,72*7.5 stp1=SupplierName.styledTextPrinter(g,72*7.5) stp1.drawBlock 200,151,72*7.5 stp2=SupplierAddress.styledTextPrinter(g,204*7.5) stp2.drawBlock 200,161,204*7.5 stp3=SupplierCity.styledTextPrinter(g,72*7.5) stp3.drawBlock 200,171,72*7.5 stp4=SupplierState.styledTextPrinter(g,72*7.5) stp4.drawBlock 200,181,72*7.5 stp5=SupplierPostCode.styledTextPrinter(g,72*7.5) stp5.drawBlock 200,191,72*7.5 stp6=SupplierCountry.styledTextPrinter(g,72*7.5) stp6.drawBlock 200,201,72*7.5 stp7=orderdate.styledTextPrinter(g,72*7.5) stp7.drawBlock 200,211,72*7.5 stp8=stkordernum.styledTextPrinter(g,72*7.5) stp8.drawBlock 200,231,72*7.5 stp14=EstDelDate1.styledTextPrinter(g,72*7.5) stp14.drawBlock 200,221,72*7.5 stp15=editfield1.styledTextPrinter(g,72*7.5) stp15.drawBlock 100,251,72*7.5 stp9=StoreName.styledTextPrinter(g,72*7.5) stp9.drawBlock 400,151,72*7.5 stp10=StoreAddress.styledTextPrinter(g,204*7.5) stp10.drawBlock 400,165,204*7.5 stp11=StoreCity.styledTextPrinter(g,72*7.5) stp11.drawBlock 400,180,72*7.5 stp12=StoreState.styledTextPrinter(g,72*7.5) stp12.drawBlock 400,195,72*7.5 stp13=StorePCode.styledTextPrinter(g,72*7.5) stp13.drawBlock 200,210,72*7.5 stp16=header.styledTextPrinter(g,72*7.5) stp16.drawBlock 100,40,72*7.5 stp17=address.styledTextPrinter(g,72*7.5) stp17.drawBlock 180,70,72*7.5 g.NextPage end if Top brisance Post subject: Re: printing g.nextpagePosted: Sat Jan 30, 2010 1:02 am Joined: Tue Oct 06, 2009 2:38 am Posts: 128 That's because your outer "if" loop only gets executed once. _________________ HOWTO: RB Feedback Utility Top Display posts from previous: All posts1 day7 days2 weeks1 month3 months6 months1 year Sort by AuthorPost timeSubject AscendingDescending Page 1 of 1 [ 2 posts ] -- Over 1500 classes with 29000 functions in one REALbasic plug-in collection. The Monkeybread Software Realbasic Plugin v9.3. http://www.monkeybreadsoftware.de/realbasic/plugins.shtml [email protected]
