New topic: Reports and Margins
<http://forums.realsoftware.com/viewtopic.php?t=33600> Page 1 of 1 [ 1 post ] Previous topic | Next topic Author Message merft Post subject: Reports and MarginsPosted: Thu Apr 29, 2010 3:01 pm Joined: Wed Mar 19, 2008 6:27 pm Posts: 13 So I have honestly confused myself and cannot figure out what is going on. I've gotten everything down using the Reports but I cannot get the page to print at the proper size. The printer settings are getting passed to the graphics object correctly. Using a 1/2-inch margin I am getting g/ps.height = 6000 (correct 10 inches @ 600dpi) and g/ps.width = 4500 (correct 7.5 inches @ 600 dpi). My report is 7.5 inches width but when I send it to print, it prints at ~6.62 inches wide. But is I send a simple graphics object it prints correctly. Code: If rs = Nil Then Beep MsgBox "No records found to print" Else //Reset Margins to 1/2 inch ps.MaxHorizontalResolution = res ps.MaxVerticalResolution = res If ps.PageSetupDialog Then dim g as graphics Dim settings As String = ps.SetupString g = OpenPrinterDialog(ps, nil) if g <> nil then dim rsq as new Reports.RecordSetQuery(rs) 'Put the records found into a Reports.DataSet If rpt.Run( rsq, ps ) Then 'if the report runs successfully //rpt.Document.Print(g) //This distorts g g.DrawRect(0, 0, ps.Width, ps.Height) //This draws correctly End If end if //Reset Margins to origin settings end if End If I am at a bit of a loss here. Why would the graphics object draw correctly but when I feed the same graphics object to the Report it scales it? Is the report object hard-coded to an 11-inch height? TIA Top Display posts from previous: All posts1 day7 days2 weeks1 month3 months6 months1 year Sort by AuthorPost timeSubject AscendingDescending Page 1 of 1 [ 1 post ] -- 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]
