none
Scale SSRS report to fit screen size

    Question

  • I have a lot of reports that are wide with lots of fields.  Whether in VS2005 or on the web, the report needs a lot of scrolling.  I tried swapping report height and width properties to change orientation from portrait to landscape, but I still cannot get the report to fit in one page.  Any suggestions?
    Wednesday, March 11, 2009 7:52 PM

Answers

  • Am I correct in understanding you want to avoid horizontal scrolling while viewing your report on screen? 

    If so and you're opening the report using a URL, you can modify the URL to pass an additional parameter which sets the  zoom level.  It's discussed in Books Online in MSDN

    It would look like this example which is also discussed in the article:

     
    http://
    <Server Name>/reportserver?/Sales/YearlySalesSummary&rs:Command=Render&rs:Format=HTML4.0&rc:Zoom=Page Width
       

    Orlanzo
    Friday, March 13, 2009 3:40 PM
  • Have a look at the documentation and examples.  They'll show where it needs to be located and the proper URL construction.
    Orlanzo
    Thursday, March 26, 2009 1:01 PM

All replies

  •  I guess what I need is to set the Zoom option in the ReportViewer toolbar to 'Page Width'.  However this is what it says in MSDN documentation:
    "
    The toolbar provides an Actions menu, page navigation for paginated reports, refresh, and zoom...

    You cannot customize the Actions menu or add new commands to it, but you can hide it by setting properties on the toolbar.
    "

    So how do we get the report to adjust to screen size??  Please advise.

    Wednesday, March 11, 2009 8:15 PM
  • well, no, that's not quite it, since when you go to print the report , you get only part of it on one page. 
    Wednesday, March 11, 2009 8:17 PM
  • For standard A4 formatting, set the report height to 11.69in and the width to 8.27in. Remove the interactive height/width settings (set to 0). Be sure to use inch instead of cm (even though its A4 and not USA-letter format).

    Then, set the report height and width smaller than the report size minus your report margins (including header and footer size if you have any). For example, your default report has 1in margins, so your total body size will be 9.69in and the width to 6.27in.

    It can be a bit bigger since rendering a report will zoom it automatically, but using these settings works for me (in both preview, PDF, Excel, etc).

    Thursday, March 12, 2009 8:13 AM
  • Thanks for your reply. 

    For landscape orientation,  I set the Report properties to height of 6.27in, and the width to 9.69in.  Didn't seem to make a difference in the look of the report, and I still need to scroll to see all the fields on a row.  

    When I go to print I still get only first four columns on first page, the others are carried to another page.

    It appears this is a 'enhancement still to happen' for Reporting Services.  I used Crystal before, and it seemed to autofit the report into one page.
    Thursday, March 12, 2009 6:37 PM
  • I think what I am looking for is not currently supported in SSRS.  I see another post byBryan asking for the same thing:

    "shrink SSRS 2008 report to fit to on to one A4 page when printing"
    Thursday, March 12, 2009 6:41 PM
  • Am I correct in understanding you want to avoid horizontal scrolling while viewing your report on screen? 

    If so and you're opening the report using a URL, you can modify the URL to pass an additional parameter which sets the  zoom level.  It's discussed in Books Online in MSDN

    It would look like this example which is also discussed in the article:

     
    http://
    <Server Name>/reportserver?/Sales/YearlySalesSummary&rs:Command=Render&rs:Format=HTML4.0&rc:Zoom=Page Width
       

    Orlanzo
    Friday, March 13, 2009 3:40 PM
  • Thanks for your reply.  I am eager to try your suggestion and am hoping it works.  Please bear with me and my newbie questions.

    In configuration manager properties for my report, this is what I have:

    TaregtServerURL: http://<Server Name>/reportserver
    TargetReportFolder: TestReports/ReportName

    Where do I add the above additional parameters to display the report accordingly?

     

     

    Wednesday, March 25, 2009 2:52 PM
  • Have a look at the documentation and examples.  They'll show where it needs to be located and the proper URL construction.
    Orlanzo
    Thursday, March 26, 2009 1:01 PM
  • Per examples, this is what I am doing in my code:

    "http://<Server Name>/reportserver?" + "/FolderName/ReportName" + "&rs:Command=Render&rs:Format=HTML4.0&rc:Zoom=Page Width"

    This is the error I am getting:

    Error:   Microsoft.Reporting.WebForms.ReportServerException: The path of the item '/FolderName/ReportName&rs:Command=Render&rs:Format=HTML4.0&rc:Zoom=Page Width' is not valid. The full path must be less than 260 characters long; other restrictions apply. If the report server is in native mode, the path must start with slash. (rsInvalidItemPath) at Microsoft.Reporting.WebForms.ServerReport.GetExecutionInfo() at Microsoft.Reporting.WebForms.ServerReport.GetParameters() at SSRS() in ReportControls.ascx.cs:line


    Thursday, April 09, 2009 3:10 PM
  • I TRIED THIS AND IT DOES NOTHING...THE REPORT STILL IS AT 100%

    http://tk5-bcstfsp-01/Reports/Pages/Report.aspx?ItemPath=%2fTfsReports%2fMOS%2fSPO%2fSPO+Reporting%2fO15_Dashboard&rs:Command=Render&rs:Format=HTML4.0&rc:Zoom=Page+Width

    Yes I work at MS.  This report needs to be displayed on several different monitors and one size does not fit all.  need the report to open page width

    v-billj

    -Bill


    -Bill

    Thursday, March 07, 2013 3:22 AM
  • Good luck with that (it's &rc:Zoom=Page%20Width) by the way.... you should be able to get it working if it's just single page.

     I have been struggling with the same thing for years presenting dashboards in IFrames...

    The 'Page-Width' zoom URL parameter has never worked well for me.

    What I do now, is I have a piece of javascript that determines the body width and body height of where the report is to be embedded, and I work out an appropriate zoom factor to use, then i set the URL of the iframe and refresh it (from an initial URL value of 'about:blank')

    This issue is rearing it's head again now that we have various tablets in use that have a much smaller resolution than current monitors. For example, the last one I worked with had a 1366x768 resolution.

    And the Zoom URL parameter is ignored by all non-IE browsers.... 


    Thanks! Josh Ash


    Thursday, March 07, 2013 4:26 AM