I like to present my report in a div
container with overflow:scroll
I have placed the crystal report viewer inside the DIV and expect it to stay within the div only, which it does. The div shows scroll bars when the report overflows.
However, my page also displays scrollbars when the report overflows, resulting in blank space equal to the height of the report.
For some reason, the z-index
of the report is not behaving as expected. I have tried setting all my divs in the html to position:relative
and used higher z-index values up to 1000, but still no success.
Am I overlooking something?
Below is my HTML code:
<div id="divCrt" class="GridTableBorder" style="left: 0px; right: 0px; overflow: scroll;
position: relative; height: 400px;width: 99%; vertical-align: top; z-index: 800; top: 0px; background-color: #b0c4de;" runat="server">
<CR:CrystalReportViewer ID="Crv" runat="server" Style="width: 98%; vertical-align: top ; overflow:hidden; " AutoDataBind="true" DisplayToolbar="False" DisplayPage="true"
Font-Names="Draft 10cpi" BestFitPage="False" >
</CR:CrystalReportViewer>
</div>
Expected outcome: divCrt should scroll without affecting the page. This code worked in VS2005 and VS2008.
Thank you
EDIT: Here is a screenshot for reference