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
1,253 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
  • 5
  • 4
10 Comments
 
LVL 37

Expert Comment

by:ValentinoV
Comment Utility
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
Comment Utility
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
Comment Utility
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
 
LVL 37

Expert Comment

by:ValentinoV
Comment Utility
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
Comment Utility
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
Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 
LVL 37

Expert Comment

by:ValentinoV
Comment Utility
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
Comment Utility
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 500 total points
Comment Utility
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
Comment Utility
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
Comment Utility
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

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

On Sep 22nd 2014 Microsoft released Update Rollup 1 for Microsoft Dynamics CRM 2013 Service Pack 1 and back in July Update Rollup 3 was released.  So we now have:   Update Rollup 1Update Rollup 2Update Rollup 3Service Pack 1Update Rollup 1 for S…
From implementing a password expiration date, to datatype conversions and file export options, these are some useful settings I've found in Jasper Server.
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

771 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now