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

Changing Page Orientation Based on the Data

Status
Not open for further replies.

lynchg

Programmer
Nov 5, 2003
347
US
Is it possible to change the page orientation from portrait to landscape based on the data?

I have a crosstab report and depending upon the data I can get anywhere from 4 or 5 columns up to 15 or 16 columns. Portrait orientation will allow for 11 columns max, I would like to use portrait when the crosstab produces up to 11 columns, but switch the orientation to landscape when there are 12 or more columns.

I have done a lot of fishing around in Help, the BO site, and I searched these forums but I haven't seen a solution. I don't see where I can in there and modify the orientation programmatically at runtime.

I am using Crystal XI R2.

Thanks.
 
You can't do this from within the report itself, although you can do it from within a separate program that runs the report and sets up the print options prior to viewing using the PrintOptions property of the ReportDocument class. Your program will have to determine how many columns there will be prior to actually running the report, though.

-Dell

A computer only does what you actually told it to do - not what you thought you told it to do.
 
Thanks, I had a feeling that I wouldn't be able to do that within Crystal. Unfortunately I am not running the reports from some other application, it is just the reports themselves that will be accessed by the users through InfoView.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top