Search Tools Links Login

Orientation - DataReport - 1 line - no API calls - unbelieveable!!!!


Visual Basic 6, or VB Classic

This code will change the orientation of the output before rptName.Show is executed. This is only one line of code, but it will do what some of the others have done with 4 pages of code. Really!!!!!

Original Author: John W. Hutchison

Assumptions

Changes Orientation to Portriat or to Landscape

Code

'This is only one line of code. The second line is the Show Method - which you have to do anyway. The rptHistSalary is the name of the report. Put this line before the Show and the report orientation will be changed. The nice thing is you don't have to change the printer orientation back because you have only changed the orientation for the report and not the printer! Since you change the orientation by report name this will not affect other reports. For reports that you want Portriat you don't have to do anything - Portriat is the default. Also, what is nice is that you don't have to be concerned about Network issues nor about operating system issues. The orientation is all done within VB. This one line of code requires that you have Service Pack 4 installed on you computer or you will get a compile error. You can get the SP 4 from Microsoft.This is my first submission to PlanetSourceCode and I am just learning how this web site works. Hope this helps.
rptHistSalary.Orientation = rptOrientLandscape
rptHistSalary.Show 1, Me

About this post

Posted: 2002-06-01
By: ArchiveBot
Viewed: 85 times

Categories

Visual Basic 6

Attachments

No attachments for this post


Loading Comments ...

Comments

No comments have been added for this post.

You must be logged in to make a comment.