Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Landscape Reports

Status
Not open for further replies.

VBpunk

Programmer
Oct 4, 1999
9
0
0
CA
Visit site
Hey all<br>
<br>
I have this program that prints<br>
a report in portait style. How do<br>
I change it to print in a landscape<br>
fashion.<br>
<br>
Dim cn As ADODB.Connection<br>
Dim rs As ADODB.Recordset<br>
<br>
Private Sub cmdFill_Click()<br>
&nbsp;&nbsp;&nbsp;&nbsp; Set rs = cn.Execute(&quot;Select * from Titles where [Year Published] &gt;= 1996&quot;)<br>
&nbsp;&nbsp;&nbsp;&nbsp; MsgBox &quot;Recordset populated.&quot;<br>
End Sub<br>
<br>
Private Sub Form_Load()<br>
&nbsp;&nbsp;&nbsp;&nbsp; Set cn = New ADODB.Connection<br>
&nbsp;&nbsp;&nbsp;&nbsp; cn.Open &quot;DSN=BIBLIO&quot;<br>
End Sub<br>
<br>
Private Sub Form_Unload(Cancel As Integer)<br>
&nbsp;&nbsp;&nbsp;&nbsp; rs.Close<br>
&nbsp;&nbsp;&nbsp;&nbsp; cn.Close<br>
End Sub<br>
<br>
Private Sub cmdReport_Click()<br>
&nbsp;&nbsp;&nbsp;&nbsp; Dim s As String<br>
&nbsp;&nbsp;&nbsp;&nbsp; s = &quot;Prepared by Abe Froman&quot;<br>
<br>
&nbsp;&nbsp;&nbsp;&nbsp; Set DataReport1.DataSource = rs<br>
&nbsp;&nbsp;&nbsp;&nbsp; DataReport1.Sections(&quot;rptHeader&quot;).Controls(&quot;lblPerson&quot;).Caption = s<br>
&nbsp;&nbsp;&nbsp;&nbsp; DataReport1.Show<br>
End Sub <p>Deryck Ramsahai<br><a href=mailto:DRams.bna@bundy.com>DRams.bna@bundy.com</a><br><a href= > </a><br>It takes two to lie. One to lie and one to listen.
 
Go to support.microsoft.com/support/kb/articles/Q198/9/01/asp and download PageSet.exe.<br>
<br>
I've done this and my reports will display/print in landscape. However, it only works here on an Admin logon. Does anyone know what can cause this? My regular users get an error &quot;The report width is larger than the page size&quot; which must be bogus because the report prints just fine if I'm logged in as myself or Administrator. <br>
<br>
I've got an NT network, users running NT 4.0 sp5. I've already given users full access to change print settings on their network printers. Any other ideas?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top