Monday, March 26, 2012

ReportView renders reports weird...?

I'm using a ReportViewer control to render reports on my page. It does render the reports, but ever report scrolls below the iframe that it creates. It's difficult to explain, but basically, you can't scroll to the bottom of the report. That data is below the iframe's bottom border. The iframe is not mine, it's created by ResportViewer. I have a screenshot to illustratehere (http://www.appell.com/imges/srsscontrol.gif)

Here's my code (it's using a MasterPage):

<asp:Content ContentPlaceHolderID="cph_MainContent" runat="server" ID="cntDefault"> Choose from the available reports:   <asp:DropDownList ID="ddlReports" runat="server" OnSelectedIndexChanged="ShowReport" AutoPostBack="true"> <asp:ListItem Value="">Select a report</asp:ListItem> </asp:DropDownList> <div style="margin:8px 0px 0px 0px;clear:both;"> <rsweb:ReportViewer ID="reportViewer1" runat="server" Font-Names="Verdana" Font-Size="8pt" Height="600px" AsyncRendering="true" ProcessingMode="Remote" ShowToolBar="True" Width="700px"> <ServerReport ReportPath="" ReportServerUrl="http://sqlwebreports/ReportServ" DisplayName="report" Timeout="1000" /> </rsweb:ReportViewer> </div></asp:Content>

Any idea what's going wrong here? BTW, I have tried changing the InteractiveSize and it doesn't matter how short I make the report, it still scrolls below the bottom...

Thanks for the help!

Eddie

Take out the div tags. If you have it in a table tags, take those out. I had the same problem. The report was in a panel that was in a table. Took out the table tags and the report rendered fine.|||Thanks, but I tried that and I get the same exact result. This code:
<asp:Content ContentPlaceHolderID="cph_MainContent" runat="server" ID="cntDefault"> Choose from the available reports:   <asp:DropDownList ID="ddlReports" runat="server" OnSelectedIndexChanged="ShowReport" AutoPostBack="true"> <asp:ListItem Value="">Select a report</asp:ListItem> </asp:DropDownList> <rsweb:ReportViewer ID="reportViewer1" runat="server" Font-Names="Verdana" Font-Size="8pt" Height="600px" AsyncRendering="true" ProcessingMode="Remote" ShowToolBar="True" Width="700px"> <ServerReport ReportPath="" ReportServerUrl="http://sqlwebreports/ReportServ" DisplayName="report" Timeout="1000" /> </rsweb:ReportViewer></asp:Content>

Renders exactly the same as the other code - the report still scrolls out of sight...

Thanks for the reply!

eddie

|||If you haven't done this yet, take out the content place holder tags and just put the viewer in a panel. Also, ssl can give the viewer trouble|||

Yeah, turns out the control just can't be used with a MasterPage. I tried everything, and the only way I could get it to work was to take it out of a ContentPlaceHolder, which is required if using a MasterPage. So I just converted this page to a standard webform and it works fine. Too bad though...

Eddie

|||

Also, you can check what settings are there for "Style" of the Report Viewer. You can acccess the styling of the ReportViewer as follows:

1) Design View

2) Right click on the ReportViewer and you will see the Style tab in the popup. Click that.

3) Go to Layout section. There should be a "Content" section. For Overflow, choose "Use Scrollbars if needed".

I believe this should solve the problem.

Good luck...

bullpit

No comments:

Post a Comment