Orientation when exporting to Excel

Normajm
Member Posts: 82
Hello,
I would like to be able to change the export to Excel report orientation.
After reviewing the forums, I believe the code should be:
But where does that bit of code go? I'm using the Excel Buffer. I tried adding it to the CreateExcelbook function, but it is not right. Do I need to set up xlsheet as a variable, if so, what type of variable?
Thank you.
JNM
I would like to be able to change the export to Excel report orientation.
After reviewing the forums, I believe the code should be:
xlSheet.PageSetup.Orientation := 2; //1:Portrait, 2:Landscape
But where does that bit of code go? I'm using the Excel Buffer. I tried adding it to the CreateExcelbook function, but it is not right. Do I need to set up xlsheet as a variable, if so, what type of variable?
CreateExcelbook() ExcelBuf.CreateBook; ExcelBuf.CreateSheet('Items','Unit Sales Report',COMPANYNAME,USERID); ExcelBuf.xlSheet.PageSetup.Orientation := 2; ExcelBuf.GiveUserControl; ERROR('');
Thank you.
JNM
0
Comments
-
The Excel Buffer "CreateSheet" function sets the orientation as Landscape. You could add another parm to the function and pass either "Landscape" or "Portrait".
Be aware that this is part of the pagesetup class. That means if a client does not have a default printer the function can bomb. You can google Microsoft Support for more information on that.So You Want to be NAV Developer?
http://www.archerpoint.com/blog/faithie-robertson
A blog by Faithie Robertson0 -
Thank you for the help. Would I be able to access table 370 functions if we do not have a developer's license? Right now, I can only see how to add fields to that table.0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions