|
-
Oct 31st, 2002, 11:15 AM
#1
Thread Starter
New Member
Landscaping the data report works, but printer defaults to portrait...
It seems as though some people have had problems getting their data reports to be landscaped. I had no problems doing this.
However, when I try to print a landscaped report, the printer always defaults to portrait orientation. The code "Printer.Orientation = vbPRORLandscape" doesn't seem to be doing the job.
Just so you know, I'm using VB6 SP5, and the following lines of code:
Printer.Orientation = vbPRORLandscape
DataReport.Orientation = rptOrientLandscape
Any suggestions on how to change the printer object's orientation?
-
Oct 31st, 2002, 11:24 AM
#2
Thread Starter
New Member
Just to clarify, the report will print out landscape if I tell it to print without a prompt. It's only when I tell it to print with a prompt that it changes the printer orientation to portrait...even when the printer's default is set to landscape in the Windows Printers control panel!
-
Jan 9th, 2003, 11:28 PM
#3
Lively Member
I still have problems trying to view in landscape...
the code is the same like yours....what is the maximum sizes from the report ?....besides that I have this problem that when after viewing the report, I close it and try to click the preview button again, it got this error -2147418113 (800ffff)' Catastrophic failure.
Here is my coding..hope you can help
Private Sub cmdPreview_Click()
UpdateRecord
ISOProject.cmdReturnSupp_Grouping autoReturnToSupp
rptreturnsupp.Show
End Sub
Private Sub UpdateRecord()
Dim cnn As ADODB.Connection
Dim strCnn As String
Dim rst As ADODB.Recordset
Dim rst1 As ADODB.Recordset
Dim strSelect As String
Set cnn = New ADODB.Connection
cnn.Open "DSN=ISOmysql;UID=root;host=Dalvinderjit;DATABASE=JJCM_ISO_DB"
Set rst = New ADODB.Recordset
rst.CursorType = adOpenKeyset
rst.LockType = adLockOptimistic
rst.Open "ReturnSupplier", cnn, , , adCmdTable
rst.AddNew
---
---
---
rst.Update
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|