Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

CRM 4.0 reports are exporting to PDF in portrait format only.  Can someone tell me how to get these to export in landscape layout?

Posted on 2009-05-15
10
Medium Priority
?
1,277 Views
Last Modified: 2012-05-07
The matter is that somewhere in the report server that supports CRM 4.0 the system is configured to export the report to PDF in portrait layout.  I need this value to be adjusted to landscape... and preferably selectable by report since some look good in portait while others need landscape.
0
Comment
Question by:Bad_billy
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 4
10 Comments
 
LVL 37

Expert Comment

by:ValentinoV
ID: 24399253
I don't know CRM 4.0 but as far as SQL Server Reporting Services is concerned (which I assume CRM is using, as you've added the SQL Reporting zones), the fact whether a report is portrait or landscape is defined in the report itself.

Brian Welcker wrote a really good explanation of this: http://blogs.msdn.com/bwelcker/archive/2005/08/19/454043.aspx
0
 
LVL 37

Expert Comment

by:ValentinoV
ID: 24399277
Forgot to mention: if you can find where the reports (.RDL) are stored in the CRM system, it should be possible to change their orientation using the Business Intelligence Development Studio.
0
 

Author Comment

by:Bad_billy
ID: 24399372
Please bear in mind that I am not trying to print the report at this point... I am trying to export it as a PDF.  

Also, while the dimensions of the report can be adjusted in the report development environment in the properties, there appears to be no property to define the layout (portrait or landscape).  If you know of the property, please advise because I cannot find it.  
0
Prepare for your VMware VCP6-DCV exam.

Josh Coen and Jason Langer have prepared the latest edition of VCP study guide. Both authors have been working in the IT field for more than a decade, and both hold VMware certifications. This 163-page guide covers all 10 of the exam blueprint sections.

 
LVL 37

Expert Comment

by:ValentinoV
ID: 24399449
Controlling the orientation when exporting to PDF is similar as for printing, PDF (just like TIFF) is a kind of "print" layout, the pages are fixed in those formats, as opposed to for instance HTML.

To change a report from portrait to landscape (or vice versa), you need to swap two report properties: PageWidth and PageHeight (not to be confused with their InteractiveP... versions which are only applicable for the interactive reports such as HTML - which is what you use when looking at the report through the Report Viewer)
0
 

Author Comment

by:Bad_billy
ID: 24402484
To reiterate; when viewing a report in the CRM report viewer, one has the option of exporting the report to PDF.  Regardless of the length and width of the report, the driver that produces the PDF document produces it in a portrait orientation.  I am realizing that my question has NOTHING to do with the page and width of the report at development time and everything to do with the settings of the driver on the server that generates the PDF at run time.  This really is not a report issue and more of a CRM server or SSRS server driver setting issue.  

So, as I am clarifying this, I am realizing that I might have pointed the conversation in a wrong direction.  I would still like the end user to be able to determine the orientation of the document that will be produced for me through the export process at time of export (probably Dynamics CRM functionality change), but I would still like to know where those server settings reside... perhaps there is a way to manipulate it through some custom venture.  

Any takers?
0
 
LVL 37

Expert Comment

by:ValentinoV
ID: 24402722
I see what you mean and I hope for you that CRM 4 offers that kind of functionality somehow.  But if CRM 4 depends on SQL Server Reporting Services for the export then as far as I know the only way to control portrait/landscape is in the actual report definition.

If you think about this, it's really not that easy to support both ways in the same report.  A reports consists of several objects, such as Table, Matrix, Textbox, Image, Tablix (in SQL2008)...  When you'd switch a report from portrait to landscape, to optimize space usage some of these controls would need to resize automatically to take advantage of the extra space. Imagine a table with 5 columns, 2 of them contain a description, 2 a price and one an amount.  Should each column resize equally?  Preferably you'd like the columns containing descriptions to get larger than those containing numbers.  And that should then be configurable somehow.  Or alternatively the engine should be intelligent enough to take the column's data type into account.  But then the report designer (person, not the app :-) should still be able to override these engine assumptions to avoid unwanted resizing situations.

As you see, something that seems simple suddenly becomes quite complex.  Again, I do hope CRM 4 has something built in that could support this, but I really doubt it.  If they do have the flexibility I would be really interested in how they've combined that with SSRS :-)
0
 

Author Comment

by:Bad_billy
ID: 24402948
The focus is not the report.  Its the server-side driver producing the exported PDF that is dicatating the orentation, not the design of the report, for even if the report were made to work in landscape, the exported PDF would still not give you a landscape orentation in the printout.  

Comments about the driver and its settings specific to the PDF export please?.  
0
 
LVL 1

Accepted Solution

by:
ACTGuru earned 2000 total points
ID: 24411721
Not that complicated - if you resize your report to landscape (11 x 8.5), the PDF is exported 11 x 8.5.
0
 

Author Comment

by:Bad_billy
ID: 24562794
I resized the layout in the report parameters and shrunk things up on the page layout where the tables set and it still doesn't export in landscape.  
0
 
LVL 37

Expert Comment

by:ValentinoV
ID: 24565709
I've thought of another way in which portrait/landscape can be controlled.  I'm not sure how this applies to CRM 4.0 but it does seem that there's a regular SQL Server Reporting Services server running behind it somewhere so maybe you could use this system as well.

The ReportServer web service allows quite a lot of configuration through its URL. This configuration includes the rendering format.  Each format device also has its own set of parameters.  The following URL (parts in capitalized letters to be customized to your situation) loads a report in PDF while setting the PageHeight and PageWidth parameters to result in a landscape report.  I tested this with a report that by default renders in portrait and it worked perfectly.

http://YOUR_SERVER/ReportServer?/PATH_TO_REPORT/REPORT&rs:Format=PDF&rc:PageWidth=11in&rc:PageHeight=8.5in

The following BOL page has a list of all PDF device parameters: http://msdn.microsoft.com/en-us/library/ms154682(SQL.90).aspx
More info on this URL Access method can be found on the same site, one level higher than the page mentioned above.


0

Featured Post

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Automatically creating a Trello card using data from a Microsoft Dynamics CRM record turned out to be an easy project that yielded great results.  Here's how I did this for an internal team at General Code.
Having trouble getting your hands on Dynamics 365 Field Service or Project Service trial? Worry No More!!!
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…
Suggested Courses

715 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question