0
我已經建立了一個基本的ReportView如下:Visual Studio速成2012 - 動態調整的報表視圖大小
<asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager>
<rsweb:ReportViewer ID="ReportViewer1" runat="server" Font-Names="Verdana" Font-Size="8pt" ProcessingMode="Remote" WaitMessageFont-Names="Verdana" WaitMessageFont-Size="14pt">
<ServerReport ReportPath="/Reports/TestReport" ReportServerUrl="http://test/ReportServer" />
</rsweb:ReportViewer>
現在調整ReportView我可以做一些簡單的,如高度/寬度:
Height = "500px" Width = "300%"
我甚至找到了超級便利的動態調整大小根據報告本身的大小中的ReportViewer:
AsyncRendering = "false" SizeToReportContent = "true"
這樣做會擺脫ReportViewer周圍任何煩人的滾動條,因爲它會變得足夠大以適應整個報表。就高度而言,這很好,但是我需要報告的寬度始終保持在指定的值(使事情看起來不那麼雜亂)。
這可能嗎?例如,我可以以某種方式將寬度設置爲900px,然後使用SizeToReportContent或等效項,以便ReportViewer的高度根據報表本身的大小自動調整,而不會影響我設置的900px寬度。
感謝您的幫助!