VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



Orientation DataReport 1 line no API calls unbelieveable

by John W. Hutchison (1 Submission)
Category: Miscellaneous
Compatability: Visual Basic 3.0
Difficulty: Beginner
Date Added: Wed 3rd February 2021
Rating: (2 Votes)

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!!!!!

Assumes
Changes Orientation to Portriat or to Landscape

Rate Orientation DataReport 1 line no API calls unbelieveable

'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

Download this snippet    Add to My Saved Code

Orientation DataReport 1 line no API calls unbelieveable Comments

No comments have been posted about Orientation DataReport 1 line no API calls unbelieveable. Why not be the first to post a comment about Orientation DataReport 1 line no API calls unbelieveable.

Post your comment

Subject:
Message:
0/1000 characters