locked
SSRS ReportViewer dynamic height RRS feed

  • General discussion

  • Hi,

    I'm displaying my SSRS reports via the web application tool ReportViewer

    The idea is to change its height based on the report. I mean, if the report is 5000px height then the ReportViewer height must be 5000px height too.

    In this way the ReportViewer scrollbar will not be displayed.

     

    <%

    @ Register Assembly="Microsoft.ReportViewer.WebForms, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"

     Namespace="Microsoft.Reporting.WebForms" TagPrefix="rsweb" %>

    <rsweb:ReportViewer ID="rvMain" Width="1500px" BorderWidth="1px" Visible="false" onprerender="rvMain_PreRender" AsyncRendering="false"

    ShowFindControls="false" BackColor="White" runat="server">

    </rsweb:ReportViewer>

    Can you please hep me how can I do that?

    Regards,

    Nadeem

    Monday, November 12, 2012 10:10 AM

All replies

  • Hi Nadeem,

    Sorry for the delay.

    You can set the SizeToReportContent property of the ReportViwer control to TRUE. This property determines whether the ReportViewer control automatically resizes to accommodate report content or not.

    Reference:
    ReportViewer.SizeToReportContent Property

    Hope this helps.

    Regards,
    Mike Yin

    TechNet Subscriber Support
    If you are TechNet Subscription user and have any feedback on our support quality, please send your feedback here.


    Mike Yin

    TechNet Community Support

    Monday, November 19, 2012 1:17 AM
  • Hi,

    I've to display report via the web application tool ReportViewer.

    PFA,Problem is after loading result view,result view horizontal scrollbar is not properly displaying.It is showing Main Vertical scrollbar to scroll down to scroll horizontally. By default taking main vertical and horizontal  scrollbar

    Requirement is that after loading, by default  it should have to show result view horizontal scroll bar not main vertical one.I've tried to apply Maxheight /Maxwidth it didn't work well.Not able to adjust height /width of result view so it will show only result view horizontal scroll bar.

    Kindly provide me solution for this type of issue as soon as possible.

    Looking forward your reply.

    In my code:

    <%@ page language="C#" autoeventwireup="true" inherits="Domains_Reports_ReportViewer, ####.Web"
    validaterequest="false" enableeventvalidation="false" stylesheettheme="####" %>

    <%@ Register Assembly="Microsoft.ReportViewer.WebForms, Version=11.0.0.0, Culture=neutral, PublicKeyToken=""
    Namespace="Microsoft.Reporting.WebForms" TagPrefix="rsweb" %>

    <!DOCTYPE html>

    <html xmlns="http://www.w3.org/1999/xhtml">
    <head runat="server">
        <title>Report Viewer</title>
       </head>
    <body >
        <div >
            <form id="form1" runat="server">
                <asp:Label ID="MessageLabel" runat ="server" ></asp:Label>
                <telerik:RadScriptManager runat="server" ID="sm" AsyncPostBackTimeout="0"></telerik:RadScriptManager>          
                <rsweb:ReportViewer ID="RvDetails"
                    runat="server"  Font-Size="8pt"
                    ShowBackButton="true"
                    ShowDocumentMapButton="true"
                    ShowCredentialPrompts="false"
                    ShowPageNavigationControls="true"
                    ShowToolBar="true"
                    ShowPrintButton="true"
                    ShowWaitControlCancelLink="true"
                    ShowReportBody="true"
                    ShowFindControls="true"
                    ShowZoomControl="true"
                    Width="100%"
                    Height="100%"
                    ProcessingMode="Remote"
                    WaitMessageFont-Names="Verdana"
                    WaitMessageFont-Size="14pt"
                    KeepSessionAlive="true"
                    BackColor="#DEE7F2" BorderColor="#A4B7D8" BorderStyle="Solid" BorderWidth="1px" InternalBorderColor="164, 183, 216" SplitterBackColor="164, 183, 216" ToolBarItemBorderColor="164, 183, 216" LinkActiveHoverColor="51, 102, 204" AsyncRendering="False">
                </rsweb:ReportViewer>
            </form>
        </div>
        
    </body>
    </html>

    • Edited by Poojaja Wednesday, May 7, 2014 8:47 AM
    Wednesday, May 7, 2014 8:40 AM