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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

problem trying to set a data report page to landscape

Status
Not open for further replies.

rlh145

Programmer
Feb 19, 2001
36
0
0
US
I need to set a report from portrait to landscape. I searched the archives and found what I thought I needed. I made sure I had service pack 5 and where I thought I needed it, I inserted the following statement:

Report8.orientation = 2

I got the following compile error: Invalid use of property.

Upon further searching, I found that this property can not be set at design time. My questions are (1) Where do I set this property? (2) Is my statement incorrect? (The Datareport name is "Report8") (3) Why is this property not visible in the properties screen for the datareport?

Thanks!
Ralph
 
Forri,

I just spoke to a tech person in my shop. They told me that if I have Service Pack 5 (And I do!) then I have all previous service packs (they are cumulative).

Thanks!
Ralph
 
Try something like this:

Private Sub DataReport_Initialize()
Report8.ReportWidth = 12240
Report8.Orientation = rptOrientLandscape
End Sub

Swi
 
Swi,

That did the trick!! I don't understand why that worked and just adding the .orientation line did not. But that is all right.

thanks!
Ralph
 
The reportwidth property returns or sets the width of the report.
Are you printing on 8 1/2 by 11? If so the reportwidth property in my example is set to 8 1/2 inches. (1440 twips in an inch)

Swi
 
I had same prob. Did SP5
Also you need to create new Data report Object and then transfer all your controls from the old one and then delete it.
SP5 solved loads of issues in Data Report.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top